diff options
Diffstat (limited to 'lib/sg_cmds_basic.c')
-rw-r--r-- | lib/sg_cmds_basic.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sg_cmds_basic.c b/lib/sg_cmds_basic.c index 844018c3..e1773542 100644 --- a/lib/sg_cmds_basic.c +++ b/lib/sg_cmds_basic.c @@ -379,7 +379,7 @@ sg_ll_inquiry_com(struct sg_pt_base * ptvp, int sg_fd, bool cmddt, bool evpd, bool local_cdb = true; int res, ret, sense_cat, resid; uint8_t inq_cdb[INQUIRY_CMDLEN] = {INQUIRY_CMD, 0, 0, 0, 0, 0}; - uint8_t sense_b[SENSE_BUFF_LEN]; + uint8_t sense_b[SENSE_BUFF_LEN] = {0}; uint8_t * up; if (resp == NULL) { @@ -738,7 +738,7 @@ sg_ll_request_sense_com(struct sg_pt_base * ptvp, int sg_fd, bool desc, static const char * const rq_s = "request sense"; uint8_t rs_cdb[REQUEST_SENSE_CMDLEN] = {REQUEST_SENSE_CMD, 0, 0, 0, 0, 0}; - uint8_t sense_b[SENSE_BUFF_LEN]; + uint8_t sense_b[SENSE_BUFF_LEN] = {0}; if (desc) rs_cdb[1] |= 0x1; @@ -837,7 +837,7 @@ sg_ll_report_luns_com(struct sg_pt_base * ptvp, int sg_fd, int select_report, int ret, res, sense_cat; uint8_t rl_cdb[REPORT_LUNS_CMDLEN] = {REPORT_LUNS_CMD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - uint8_t sense_b[SENSE_BUFF_LEN]; + uint8_t sense_b[SENSE_BUFF_LEN] = {0}; rl_cdb[2] = select_report & 0xff; sg_put_unaligned_be32((uint32_t)mx_resp_len, rl_cdb + 6); |