netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hagen Paul Pfeifer <hagen@jauu.net>
To: David Laight <David.Laight@ACULAB.COM>
Cc: Stephen Hemminger <shemminger@vyatta.com>, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2 1/2] utils: add s32 parser
Date: Fri, 25 Nov 2011 18:47:51 +0100	[thread overview]
Message-ID: <20111125174751.GA3751@hell> (raw)
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6D8AEE6@saturn3.aculab.com>

* David Laight | 2011-11-25 17:34:21 [-0000]:

>If you are that worried about numeric overflow (IIRC) you have
>have to check the result for LONG_MIN/MAX (etc) before looking
>at errno.
>
>strtoul() is defined to support -ve values, and I think the
>C rules for conversion between signed and unsigned ints
>DTRT even for non 2's compliment systems.
>
>Some of these bound checks are a waste of time.
>The SUS doesn't require standard utilities to perform them.

David: are you able to fix all conversations functions in utils.c (and add
get_s32). If not I will repost get_s32 with strtol() with the same error check
mechanism as get_* (to be consistent).

Stephen, any other ideas?

Hagen

  reply	other threads:[~2011-11-25 17:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-24 17:40 [PATCH iproute2 1/2] utils: add s32 parser Hagen Paul Pfeifer
2011-11-24 17:40 ` [PATCH iproute2 2/2] tc: netem ratelatency and cell extension Hagen Paul Pfeifer
2011-11-25  9:46 ` [PATCH iproute2 1/2] utils: add s32 parser David Laight
2011-11-25 11:13   ` Hagen Paul Pfeifer
2011-11-25 17:24   ` Stephen Hemminger
2011-11-25 17:34     ` David Laight
2011-11-25 17:47       ` Hagen Paul Pfeifer [this message]
2011-11-25 23:00         ` [PATCH iproute2] " Hagen Paul Pfeifer
2011-11-26  0:50           ` Stephen Hemminger
2011-11-26 10:54             ` Hagen Paul Pfeifer
2012-01-19 22:41 ` [PATCH iproute2 1/2] " Stephen Hemminger
2012-01-19 22:48   ` Hagen Paul Pfeifer

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=20111125174751.GA3751@hell \
    --to=hagen@jauu.net \
    --cc=David.Laight@ACULAB.COM \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.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;
as well as URLs for NNTP newsgroup(s).