httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject cvs commit: apache-1.3/src/ap ap_strtol.c
Date Tue, 18 Jun 2002 04:10:58 GMT
brianp      2002/06/17 21:10:58

  Modified:    src/ap   ap_strtol.c
  Log:
  use signed long to avoid compiler complaints about the negation of unsigned
  
  Revision  Changes    Path
  1.6       +5 -3      apache-1.3/src/ap/ap_strtol.c
  
  Index: ap_strtol.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/ap/ap_strtol.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ap_strtol.c	18 Jun 2002 03:13:25 -0000	1.5
  +++ ap_strtol.c	18 Jun 2002 04:10:57 -0000	1.6
  @@ -118,6 +118,7 @@
   	char c;
   	unsigned long cutoff;
   	int neg, any, cutlim;
  +        long result;
   
   	/*
   	 * Skip white space and pick up leading +/- sign if any.
  @@ -189,15 +190,16 @@
   		}
   	}
   	if (any < 0) {
  -		acc = neg ? LONG_MIN : LONG_MAX;
  +		result = neg ? LONG_MIN : LONG_MAX;
   		errno = ERANGE;
   	} else if (!any) {
   noconv:
  +                result = (long)acc;
   		errno = EINVAL;
   	} else if (neg)
  -		acc = -acc;
  +		result = -(long)acc;
   	if (endptr != NULL)
   		*endptr = (char *)(any ? s - 1 : nptr);
  -	return (acc);
  +	return (result);
   }
   
  
  
  

Mime
View raw message