From owner-cvs-sys Thu May 2 03:05:35 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id DAA13260 for cvs-sys-outgoing; Thu, 2 May 1996 03:05:35 -0700 (PDT) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id DAA13218 Thu, 2 May 1996 03:04:36 -0700 (PDT) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id LAA10955; Thu, 2 May 1996 11:52:00 +0200 From: Luigi Rizzo Message-Id: <199605020952.LAA10955@labinfo.iet.unipi.it> Subject: Re: cvs commit: src/sys/netinet tcp_input.c udp_usrreq.c To: davidg@Root.COM Date: Thu, 2 May 1996 11:52:00 +0200 (MET DST) Cc: fenner@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-sys@freefall.freebsd.org In-Reply-To: <199605020538.WAA11311@Root.COM> from "David Greenman" at May 1, 96 10:38:19 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > 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/ ====================================================================