| From bafeabbc474a98314e8cecf42c8339e1da21fea2 Mon Sep 17 00:00:00 2001 |
| From: Mike Frysinger <vapier@gentoo.org> |
| Date: Thu, 9 Mar 2017 16:23:19 -0800 |
| Subject: [PATCH] fix typo in scsi_cmd setup |
| |
| The memset call ends up referring to the function scsi_cmd and |
| clearing its memory instead of the local my_scsi_cmd variable. |
| --- |
| scsi.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| diff --git a/scsi.c b/scsi.c |
| index 7510edcefe95..85ff3bc3dc55 100644 |
| --- a/scsi.c |
| +++ b/scsi.c |
| @@ -170,7 +170,7 @@ int scsi_cmd(int fd, unsigned char *cdb, int cmdlen, scsi_io_mode_t mode, |
| /* |
| ** Init the command |
| */ |
| - memset(&scsi_cmd,0,sizeof(scsi_cmd)); |
| + memset(&my_scsi_cmd,0,sizeof(my_scsi_cmd)); |
| my_scsi_cmd.interface_id = 'S'; |
| my_scsi_cmd.dxfer_direction = (mode == SCSI_IO_READ)?(SG_DXFER_FROM_DEV):(SG_DXFER_TO_DEV); |
| my_scsi_cmd.cmd_len = cmdlen; |
| -- |
| 2.12.0 |
| |