From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2] hush: fix some quoted variable expansion issues
Date: Sat, 01 Mar 2014 22:13:20 -0700 [thread overview]
Message-ID: <5312BDF0.1010107@wwwdotorg.org> (raw)
In-Reply-To: <CAPnjgZ0rBFV=CbOJ1G8WgUi1fH2=apKA1Q3i8Pd5_Z_ag_2s0Q@mail.gmail.com>
On 03/01/2014 05:10 PM, Simon Glass wrote:
> Hi Stephen,
>
> On 27 February 2014 22:00, Stephen Warren <swarren@wwwdotorg.org
> <mailto:swarren@wwwdotorg.org>> wrote:
>
> The following shell command fails:
>
> if test -z "$x"; then echo "zero"; else echo "non-zero"; fi
>
> (assuming $x does not exist, it prints "non-zero" rather than "zero").
...
> @@ -2470,8 +2473,14 @@ static int done_word(o_string *dest, struct
> p_context *ctx)
> argc = ++child->argc;
> child->argv = realloc(child->argv,
> (argc+1)*sizeof(*child->argv));
> if (child->argv == NULL) return 1;
> + child->argv_nonnull = realloc(child->argv_nonnull,
> +
> (argc+1)*sizeof(*child->argv_nonnull));
> + if (child->argv_nonnull == NULL)
> + return 1;
> child->argv[argc-1]=str;
> + child->argv_nonnull[argc-1] = dest->nonnull;
> child->argv[argc]=NULL;
> + child->argv_nonnull[argc] = 0;
>
>
> NULL to be consistent?
This is assigning an entry in the array, and the entry type is int.
I'll fix up the other issues.
prev parent reply other threads:[~2014-03-02 5:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 5:00 [U-Boot] [PATCH V2] hush: fix some quoted variable expansion issues Stephen Warren
2014-03-02 0:10 ` Simon Glass
2014-03-02 0:16 ` Simon Glass
2014-03-02 4:26 ` Stephen Warren
2014-03-03 14:28 ` Tom Rini
2014-03-02 5:13 ` Stephen Warren [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=5312BDF0.1010107@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=u-boot@lists.denx.de \
/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