[PATCH] xfstests: memset proper length in resvtest.c

Eric Sandeen sandeen at redhat.com
Mon Mar 3 23:25:44 CST 2014


sizeof(pointer) is not very relevant; sizeof(*pointer)
is a bit more so.

Signed-off-by: Eric Sandeen <sandeen at redhat.com>
---

diff --git a/src/resvtest.c b/src/resvtest.c
index 037d9ea..a07f503 100644
--- a/src/resvtest.c
+++ b/src/resvtest.c
@@ -73,7 +73,7 @@ main(int argc, char **argv)
 		perror("open");
 		exit(1);
 	}
-	memset(writebuffer, 'A', sizeof(writebuffer));
+	memset(writebuffer, 'A', sizeof(*writebuffer));
 
 	unlink(filename);
 	writefd = open(filename, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);



More information about the xfs mailing list