On Tue, Jul 24, 2018 at 12:28 AM,  <n...@apache.org> 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.

Reply via email to