Date: Thu, 2 May 1996 11:52:00 +0200 (MET DST) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: davidg@Root.COM Cc: fenner@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-sys@freefall.freebsd.org Subject: Re: cvs commit: src/sys/netinet tcp_input.c udp_usrreq.c Message-ID: <199605020952.LAA10955@labinfo.iet.unipi.it> In-Reply-To: <199605020538.WAA11311@Root.COM> from "David Greenman" at May 1, 96 10:38:19 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> > Modified: sys/netinet tcp_input.c udp_usrreq.c > > Log: > > Size temp var correctly; buf[4*sizeof "123"] is not long enough > > to store "192.252.119.189\0". > > Hmmm. 4 * sizeof("123") is 16, and that's what your example above needs. Am > I missing something? Can't one just write buf[16] and leave the rest in a comment ? buf[4*strlen("123")] is much more cryptic than an explicit constant. Luigi ==================================================================== Luigi Rizzo Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it Universita' di Pisa tel: +39-50-568533 via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 http://www.iet.unipi.it/~luigi/ ====================================================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605020952.LAA10955>