From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Alban Bedel <albeu@free.fr>, linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH 1/2] MIPS: FW: Fix parsing u-boot environment
Date: Fri, 07 Nov 2014 15:43:10 +0300 [thread overview]
Message-ID: <545CBE5E.3050906@cogentembedded.com> (raw)
In-Reply-To: <1415359381-27257-1-git-send-email-albeu@free.fr>
Hello.
On 11/7/2014 2:23 PM, Alban Bedel wrote:
> When reading u-boot's key=value pairs it should skip the '=' and not
> use the next argument.
> Signed-off-by: Alban Bedel <albeu@free.fr>
> ---
> arch/mips/fw/lib/cmdline.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/arch/mips/fw/lib/cmdline.c b/arch/mips/fw/lib/cmdline.c
> index ffd0345..cc5d168 100644
> --- a/arch/mips/fw/lib/cmdline.c
> +++ b/arch/mips/fw/lib/cmdline.c
> @@ -68,7 +68,7 @@ char *fw_getenv(char *envname)
> result = fw_envp(index + 1);
> break;
> } else if (fw_envp(index)[i] == '=') {
> - result = (fw_envp(index + 1) + i);
> + result = (fw_envp(index) + i + 1);
Perhaps it's time to drop the useless outer parens?
WBR, Sergei
next prev parent reply other threads:[~2014-11-07 12:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 11:23 [PATCH 1/2] MIPS: FW: Fix parsing u-boot environment Alban Bedel
2014-11-07 11:23 ` [PATCH 2/2] MIPS: FW: Use kstrtoul() to parse unsigned long from the fw environment Alban Bedel
2014-11-07 12:43 ` Sergei Shtylyov [this message]
2014-11-08 11:36 ` [PATCH 1/2] MIPS: FW: Fix parsing u-boot environment Alban
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=545CBE5E.3050906@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=albeu@free.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.