diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2016-05-25 14:34:54 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2016-05-25 14:34:54 +0000 |
commit | eb96c6181e4436199a942054891420a07969f885 (patch) | |
tree | a2e3366d4def02225988d55caafc8d137ad169a2 /src/sg_sat_identify.c | |
parent | 1cf38337d813d7d564fde9e7cfc47388cad89e16 (diff) | |
download | sg3_utils-eb96c6181e4436199a942054891420a07969f885.tar.gz |
gcc-6: -Wmisleading-indentation cleanups
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@708 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_sat_identify.c')
-rw-r--r-- | src/sg_sat_identify.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/sg_sat_identify.c b/src/sg_sat_identify.c index 8524df3d..f74059fb 100644 --- a/src/sg_sat_identify.c +++ b/src/sg_sat_identify.c @@ -9,6 +9,7 @@ #include <fcntl.h> #include <stdio.h> #include <stdlib.h> +#include <stdbool.h> #include <string.h> #include <getopt.h> #define __STDC_FORMAT_MACROS 1 @@ -49,7 +50,7 @@ #define EBUFF_SZ 256 -static const char * version_str = "1.13 20160517"; +static const char * version_str = "1.14 20160525"; static struct option long_options[] = { {"ck_cond", no_argument, 0, 'c'}, @@ -118,8 +119,8 @@ static int do_identify_dev(int sg_fd, int do_packet, int cdb_len, int byte_block = 1; /* 0 -> bytes, 1 -> 512 byte blocks (if t_type=0) */ int t_length = 2; /* 0 -> no data transferred, 2 -> sector count */ int resid = 0; - int got_ard = 0; /* got ATA result descriptor */ - int got_fixsense = 0; /* got ATA result in fixed format sense */ + bool got_ard = false; /* got ATA result descriptor */ + bool got_fixsense = false; /* got ATA result in fixed format sense */ int sb_sz; struct sg_scsi_sense_hdr ssh; unsigned char inBuff[ID_RESPONSE_LEN]; @@ -221,17 +222,17 @@ static int do_identify_dev(int sg_fd, int do_packet, int cdb_len, "Descriptor\n"); return SG_LIB_CAT_RECOVERED; } - got_ard = 1; + got_ard = true; break; } else if (0x70 == ssh.response_code) { - got_fixsense = 1; + got_fixsense = true; break; } else { if (verbose < 2) pr2serr("ATA PASS-THROUGH (%d), unexpected " "response_code=0x%x\n", ssh.response_code, cdb_len); - return SG_LIB_CAT_RECOVERED; + return SG_LIB_CAT_RECOVERED; } } else if (SPC_SK_RECOVERED_ERROR == ssh.sense_key) return SG_LIB_CAT_RECOVERED; @@ -299,7 +300,7 @@ static int do_identify_dev(int sg_fd, int do_packet, int cdb_len, return -1; } - if ((SAT_ATA_RETURN_DESC == ata_return_desc[0]) && (0 == got_ard)) + if ((SAT_ATA_RETURN_DESC == ata_return_desc[0]) && (! got_ard)) pr2serr("Seem to have got ATA Result Descriptor but it was not " "indicated\n"); if (got_ard) { |