All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Mike Frysinger <vapier.adi@gmail.com>
Cc: MTD list <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH 1/2] mtd-utils: improve simple_strtoX usage commentary
Date: Sat, 09 Apr 2011 17:39:50 +0300	[thread overview]
Message-ID: <1302359990.2787.13.camel@localhost> (raw)
In-Reply-To: <BANLkTi=NSasDOP=xSxD3zxQNCQEOc1dV6w@mail.gmail.com>

On Fri, 2011-04-08 at 12:20 -0400, Mike Frysinger wrote:
> On Fri, Apr 8, 2011 at 11:07, Artem Bityutskiy wrote:
> > + * num = simple_strtoul(str, &error);
> > + * if (error || !is_valid_number(num))
> > + *     error_happened();
> 
> when i read this, it makes me think there is a "is_valid_number()"
> function i should be calling.
> 
> maybe something like:
> if (error || ... number is out of range for your need ...)
> -mike

I'll do this and push this out, thanks for review!

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

      reply	other threads:[~2011-04-09 14:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08 15:07 [PATCH 1/2] mtd-utils: improve simple_strtoX usage commentary Artem Bityutskiy
2011-04-08 15:07 ` [PATCH 2/2] mtd-utils: switch ubi and ubifs tools to use common strtoX funcs Artem Bityutskiy
2011-04-08 16:20 ` [PATCH 1/2] mtd-utils: improve simple_strtoX usage commentary Mike Frysinger
2011-04-09 14:39   ` Artem Bityutskiy [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=1302359990.2787.13.camel@localhost \
    --to=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=vapier.adi@gmail.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 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.