From: Ted Ts'o <tytso@mit.edu>
To: Andreas Dilger <adilger@whamcloud.com>
Cc: linux-ext4@vger.kernel.org, Jim Garlick <garlick@llnl.gov>
Subject: Re: [PATCH 1/2] misc: Allow "-E" and "-O" options multiple times
Date: Sun, 10 Jul 2011 16:59:54 -0400 [thread overview]
Message-ID: <20110710205954.GC5615@thunk.org> (raw)
In-Reply-To: <1310172544-18650-1-git-send-email-adilger@whamcloud.com>
On Fri, Jul 08, 2011 at 06:49:03PM -0600, Andreas Dilger wrote:
> +errcode_t append_opts(char **old_opts, const char *added_opts)
> +{
> + /* First string adds NUL, others add ',' */
> + int newlen, oldlen = 0;
> + errcode_t retval;
> +
> + if (*old_opts != NULL)
> + oldlen = strlen(*old_opts);
> +
> + newlen = oldlen + strlen(added_opts) + 1;
Shouldn't this be "... + 2" instead? Suppose old_opts is "foo", and
new_opts is "bar". We need enough space for 8 characters: "foo,bar\0"
Also, can you do me a favor and rebase this patch series on top of the
most recent next branch of e2fsprogs. The pass1b changes are going to
be impacted by the changes to support bigalloc which showed up in next
over the weekend.
Thanks!!
- Ted
prev parent reply other threads:[~2011-07-10 20:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-09 0:49 [PATCH 1/2] misc: Allow "-E" and "-O" options multiple times Andreas Dilger
2011-07-09 0:49 ` [PATCH 2/2] e2fsck: allow shared blocks to be handled safely Andreas Dilger
2011-07-10 20:46 ` [PATCH 1/2] misc: Allow "-E" and "-O" options multiple times Ted Ts'o
2011-07-10 20:59 ` Ted Ts'o [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=20110710205954.GC5615@thunk.org \
--to=tytso@mit.edu \
--cc=adilger@whamcloud.com \
--cc=garlick@llnl.gov \
--cc=linux-ext4@vger.kernel.org \
/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).