Fix memset calls in tgtimg.c and iscsi/md5.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Arne Redlich <arne.redlich@xxxxxxxxxxxxxx>
---
 usr/iscsi/md5.c |    2 +-
 usr/tgtimg.c    |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/usr/iscsi/md5.c b/usr/iscsi/md5.c
index 4ef1cb7..ba6c86d 100644
--- a/usr/iscsi/md5.c
+++ b/usr/iscsi/md5.c
@@ -127,7 +127,7 @@ MD5Final(md5byte digest[16], struct MD5Context *ctx)
 
 	byteSwap(ctx->buf, 4);
 	memcpy(digest, ctx->buf, 16);
-	memset(ctx, 0, sizeof(ctx));	/* In case it's sensitive */
+	memset(ctx, 0, sizeof(*ctx));	/* In case it's sensitive */
 }
 
 #ifndef ASM_MD5
diff --git a/usr/tgtimg.c b/usr/tgtimg.c
index f4388d9..bc60f5e 100644
--- a/usr/tgtimg.c
+++ b/usr/tgtimg.c
@@ -263,7 +263,7 @@ static int ssc_new(int op, char *path, char *barcode, char *capacity,
 	if (size == 0)
 		size = 8000;
 
-	memset(h, 0, sizeof(h));
+	memset(h, 0, sizeof(*h));
 	h->blk_type = BLK_BOT;
 	h->blk_num = 0;
 	h->blk_sz = size;
@@ -320,7 +320,7 @@ static int ssc_new(int op, char *path, char *barcode, char *capacity,
 		exit(1);
 	}
 
-	memset(h, 0, sizeof(h));
+	memset(h, 0, sizeof(*h));
 	h->blk_type = BLK_EOD;
 	h->blk_num = 1;
 	h->prev = 0;
-- 
1.7.9.1



--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux