httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: cvs commit: apache/src util.c
Date Sun, 29 Jun 1997 17:48:01 GMT
I was about to complain about size_t possibly not being defined on
braindead systems when I noticed we've been using it for ap_snprintf.
Cool, I much prefer size_t over int when specifying lengths. 

But I'm really curious what vc++ was complaining about.  It had no right
to bitch about anything you changed in this commit.  size_t is the type of
array indicies but int can be promoted to size_t... 

Dean

On Sun, 29 Jun 1997, Ben Laurie wrote:

> ben         97/06/29 10:27:01
> 
>   Modified:    src       util.c
>   Log:
>   Fix VC++ warnings
>   
>   Revision  Changes    Path
>   1.58      +6 -5      apache/src/util.c
>   
>   Index: util.c
>   ===================================================================
>   RCS file: /export/home/cvs/apache/src/util.c,v
>   retrieving revision 1.57
>   retrieving revision 1.58
>   diff -C3 -r1.57 -r1.58
>   *** util.c	1997/06/28 22:39:23	1.57
>   --- util.c	1997/06/29 17:26:59	1.58
>   ***************
>   *** 211,217 ****
>         const char *src = input;
>         char *dest, *dst;
>         char c;
>   !     int no, len;
>     
>         if (!source) return NULL;
>         if (!nmatch) return pstrdup(p, src);
>   --- 211,218 ----
>         const char *src = input;
>         char *dest, *dst;
>         char c;
>   !     size_t no;
>   !     int len;
>     
>         if (!source) return NULL;
>         if (!nmatch) return pstrdup(p, src);
>   ***************
>   *** 226,234 ****
>     	else if (c == '$' && isdigit(*src))
>     	    no = *src++ - '0';
>     	else
>   ! 	    no = -1;
>     	
>   ! 	if (no < 0) {   /* Ordinary character. */
>     	    if (c == '\\' && (*src == '$' || *src == '&'))
>     		c = *src++;
>     	    len++;
>   --- 227,235 ----
>     	else if (c == '$' && isdigit(*src))
>     	    no = *src++ - '0';
>     	else
>   ! 	    no = 10;
>     	
>   ! 	if (no > 9) {   /* Ordinary character. */
>     	    if (c == '\\' && (*src == '$' || *src == '&'))
>     		c = *src++;
>     	    len++;
>   ***************
>   *** 250,258 ****
>     	else if (c == '$' && isdigit(*src))
>     	    no = *src++ - '0';
>     	else
>   ! 	    no = -1;
>     	
>   ! 	if (no < 0) {   /* Ordinary character. */
>     	    if (c == '\\' && (*src == '$' || *src == '&'))
>     		c = *src++;
>     	    *dst++ = c;
>   --- 251,259 ----
>     	else if (c == '$' && isdigit(*src))
>     	    no = *src++ - '0';
>     	else
>   ! 	    no = 10;
>     	
>   ! 	if (no > 9) {   /* Ordinary character. */
>     	    if (c == '\\' && (*src == '$' || *src == '&'))
>     		c = *src++;
>     	    *dst++ = c;
>   
>   
>   
> 


Mime
View raw message