Re: svn commit: r1836519 - /apr/apr/trunk/strings/apr_strings.c
I'm concerned that you've made a specific assumption of 2's compliment int. Nothing in the spec or real world assures us of this. Intel x86 is 2's compliment, but this is a bad assumption. On Mon, Jul 23, 2018, 17:33 Yann Ylavic wrote: > On Tue, Jul 24, 2018 at 12:28 AM, wrote: > > > > @@ -387,18 +389,20 @@ APR_DECLARE(char *) apr_ltoa(apr_pool_t > > char *buf = apr_palloc(p, BUFFER_SIZE); > > char *start = buf + BUFFER_SIZE - 1; > > int negative; > > +unsigned int un; > > unsigned long for ltoa? > > > if (n < 0) { > > negative = 1; > > - n = -n; > > + un = -n; > > } > > else { > > negative = 0; > > +un = n; > > } > > *start = 0; > > do { > > - *--start = (char)('0' + (n % 10)); > > - n /= 10; > > -} while (n); > > + *--start = (char)('0' + (un % 10)); > > + un /= 10; > > +} while (un); > > if (negative) { > > *--start = '-'; > > } > > Regards, > Yann. >
Re: svn commit: r1836519 - /apr/apr/trunk/strings/apr_strings.c
On Tue, Jul 24, 2018 at 12:28 AM, wrote: > > @@ -387,18 +389,20 @@ APR_DECLARE(char *) apr_ltoa(apr_pool_t > char *buf = apr_palloc(p, BUFFER_SIZE); > char *start = buf + BUFFER_SIZE - 1; > int negative; > +unsigned int un; unsigned long for ltoa? > if (n < 0) { > negative = 1; > - n = -n; > + un = -n; > } > else { > negative = 0; > +un = n; > } > *start = 0; > do { > - *--start = (char)('0' + (n % 10)); > - n /= 10; > -} while (n); > + *--start = (char)('0' + (un % 10)); > + un /= 10; > +} while (un); > if (negative) { > *--start = '-'; > } Regards, Yann.
buildbot failure in on apr-x64-macosx-trunk
The Buildbot has detected a new failure on builder apr-x64-macosx-trunk while building . Full details are available at: https://ci.apache.org/builders/apr-x64-macosx-trunk/builds/131 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: svn-x64-macosx-dgvrs Build Reason: The AnyBranchScheduler scheduler named 'on-apr-commit' triggered this build Build Source Stamp: [branch apr/apr/trunk] 1836519 Blamelist: niq BUILD FAILED: failed Test Sincerely, -The Buildbot