xfs
[Top] [All Lists]

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

To: xfs-oss <xfs@xxxxxxxxxxx>
Subject: [PATCH] xfstests: memset proper length in resvtest.c
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Mon, 03 Mar 2014 23:25:44 -0600
Delivered-to: xfs@xxxxxxxxxxx
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.3.0
sizeof(pointer) is not very relevant; sizeof(*pointer)
is a bit more so.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

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);

<Prev in Thread] Current Thread [Next in Thread>