From: Nix <nix@esperi.org.uk>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: Clemens Buchacher <drizzd@aon.at>,
Sverre Rabbelier <srabbelier@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH 2/2] Support sizes >=2G in various config options accepting 'g' sizes.
Date: Tue, 06 Sep 2011 11:25:32 +0100 [thread overview]
Message-ID: <87liu2j7c3.fsf@spindle.srvr.nix> (raw)
In-Reply-To: <4E65F451.4070900@viscovery.net> (Johannes Sixt's message of "Tue, 06 Sep 2011 12:22:09 +0200")
On 6 Sep 2011, Johannes Sixt verbalised:
> Why so? strtol() can report overflow:
... it can?!
> ...
> If the correct value is outside the range of representable values,
> {LONG_MIN}, {LONG_MAX}, {LLONG_MIN}, or {LLONG_MAX} shall be returned
> (according to the sign of the value), and errno set to [ERANGE].
I've been using it for longer than I care to imagine and I've never once
noticed that.
OK, I'll add range checking support then! following which we can detect
config value overflow on the most pathetic platform imaginable, except
that such a platform would probably not bother to set ERANGE properly ;}
Fixed patch following later today ripping out the STRTOMAX renaming and
adding proper range checking.
--
NULL && (void)
next prev parent reply other threads:[~2011-09-06 10:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-05 11:45 [PATCH 1/2] Add strtoimax() compatibility function Nix
2011-09-05 11:45 ` [PATCH 2/2] Support sizes >=2G in various config options accepting 'g' sizes Nix
2011-09-05 13:49 ` Sverre Rabbelier
2011-09-05 13:56 ` Nix
2011-09-06 7:44 ` Clemens Buchacher
2011-09-06 9:13 ` Nix
2011-09-06 10:22 ` Johannes Sixt
2011-09-06 10:25 ` Nix [this message]
2011-09-06 10:38 ` Johannes Sixt
2011-09-06 11:17 ` Nix
2011-09-06 6:19 ` [PATCH 1/2] Add strtoimax() compatibility function Junio C Hamano
2011-09-06 9:14 ` Nix
-- strict thread matches above, loose matches on Subject: below --
2011-11-02 15:46 [PATCH 0/2] Support sizes >=2G in various config options, v2 Nick Alcock
2011-11-02 15:46 ` [PATCH 2/2] Support sizes >=2G in various config options accepting 'g' sizes Nick Alcock
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=87liu2j7c3.fsf@spindle.srvr.nix \
--to=nix@esperi.org.uk \
--cc=drizzd@aon.at \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
--cc=srabbelier@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 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).