Date: Fri, 28 Apr 2000 20:18:49 -0500 (CDT) From: Guy Helmer <ghelmer@cs.iastate.edu> To: Ben Smithurst <ben@scientia.demon.co.uk> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/cron/lib env.c Message-ID: <Pine.HPX.4.05.10004282012120.12790-100000@popeye.cs.iastate.edu> In-Reply-To: <20000428221611.D17098@strontium.scientia.demon.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 28 Apr 2000, Ben Smithurst wrote: > Guy Helmer wrote: > > > Use consistent types in sizeof when malloc'ing memory for the > > environment. > > - p = (char **) malloc((count+1) * sizeof(char *)); /* 1 for the NULL */ > + p = (char **) malloc((count+1) * sizeof(char **)); /* 1 for the NULL */ > > uh, I think this change is wrong. As p is a 'char **' you are > allocating space for 'char *' values, not 'char **' values. Not that it > really matters, except from a style point of view. Yes, you are right. There are two other places in env.c where it was already "sizeof(char **)"; I first changed those to "sizeof(char *)" but then convinced myself those two were right and this one place was wrong. I'll get to it Sunday unless someone believes this requires immediate attention. Thanks, Guy Guy Helmer, Ph.D. Candidate, Iowa State University Dept. of Computer Science Research Assistant, Dept. of Computer Science --- ghelmer@cs.iastate.edu http://www.cs.iastate.edu/~ghelmer To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.HPX.4.05.10004282012120.12790-100000>