httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@worldgate.com>
Subject Re: cvs commit: apache/src http_conf_globals.h http_config.c http_core.c http_main.c httpd.h
Date Sat, 28 Jun 1997 23:54:43 GMT
On Sat, 28 Jun 1997, Dean Gaudet wrote:

> > >     #endif
> > >     #endif /* WIN32 */
> > >     
> > >   + #if defined(USE_FCNTL_SERIALIZED_ACCEPT) || defined(USE_FLOCK_SERIALIZED_ACCEPT)
> > >   + static void expand_lock_fname(pool *p)
> > >   + {
> > >   +     char buf[20];
> > >   + 
> > >   +     ap_snprintf( buf, sizeof(buf)-1, ".%u", getpid() );
> > >   +     buf[sizeof(buf)-1] = 0;
> > 
> > This should be '\0', not 0.
> 
> They're the same thing.
> 

No they aren't.  They _DO_ the same thing but they aren't the same thing.

Would it be valid to put NULL there?  No.  Is it valid to put 0 there?
Not IMHO.

But in any case, I am about to remove that line entirely because it is
bogus; snprintf always null terminates a string anyway.  Good way to solve
a problem.  <g>


Mime
View raw message