From: Eric Sandeen <sandeen@sandeen.net>
To: Brian Foster <bfoster@redhat.com>, Eric Sandeen <sandeen@redhat.com>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfstests: memset proper length in resvtest.c
Date: Tue, 04 Mar 2014 10:49:29 -0600 [thread overview]
Message-ID: <53160419.50104@sandeen.net> (raw)
In-Reply-To: <20140304153655.GC51235@bfoster.bfoster>
On 3/4/14, 9:36 AM, Brian Foster wrote:
> On Mon, Mar 03, 2014 at 11:25:44PM -0600, Eric Sandeen wrote:
>> sizeof(pointer) is not very relevant; sizeof(*pointer)
>> is a bit more so.
>>
>> Signed-off-by: Eric Sandeen <sandeen@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));
>>
>
> It's not clear to me how much this is intending to write/read. If the
> entire buffer, we should probably use the buffer size.
> sizeof(*writebuffer) is a single byte, no?
>
> Also, there are other instances of the same thing throughout this file.
> I think they need to be consistent, in any event, for the test to work.
yeah, sorry, I was in a bit too much of a rush; just disregard this
for now I guess. too-quick reaction to a gcc compile warning.
-Eric
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2014-03-04 16:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 5:25 [PATCH] xfstests: memset proper length in resvtest.c Eric Sandeen
2014-03-04 15:36 ` Brian Foster
2014-03-04 16:49 ` Eric Sandeen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53160419.50104@sandeen.net \
--to=sandeen@sandeen.net \
--cc=bfoster@redhat.com \
--cc=sandeen@redhat.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).