public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: Theodore Tso <tytso@mit.edu>, xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfstests: fix up fs_perms test used by 126
Date: Mon, 8 Feb 2010 14:40:58 -0500	[thread overview]
Message-ID: <20100208194058.GC9527@infradead.org> (raw)
In-Reply-To: <4B6C4E81.6060201@sandeen.net>

On Fri, Feb 05, 2010 at 10:59:45AM -0600, Eric Sandeen wrote:
> @@ -53,7 +53,8 @@ int main( int argc, char *argv[]) {
>                cgroupId = atoi(argv[3]);
>                userId = atoi(argv[4]);
>                groupId = atoi(argv[5]);
> -              fperm[0] = *argv[6];
> +              strncpy(fperm, argv[6], 3);
> +              fperm[2] = '\0';

This still looks rather weird to me.  What's the reason for copying
the string into a fixed length buffer?  Why not leave fperm as a pointer
to the original argument?

The rest of the patch looks fine, but a clean up pass on the whole
file wouldn't hurt either, it's a grotty mess..

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2010-02-08 19:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-05 16:59 [PATCH] xfstests: fix up fs_perms test used by 126 Eric Sandeen
2010-02-08 19:40 ` Christoph Hellwig [this message]
2010-02-08 19:47   ` Eric Sandeen
2010-02-09 16:54   ` [PATCH V2] " Eric Sandeen
2010-02-09 17:53     ` Christoph Hellwig

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=20100208194058.GC9527@infradead.org \
    --to=hch@infradead.org \
    --cc=sandeen@sandeen.net \
    --cc=tytso@mit.edu \
    --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