Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Apr 2000 22:16:11 +0100
From:      Ben Smithurst <ben@scientia.demon.co.uk>
To:        Guy Helmer <ghelmer@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.sbin/cron/lib env.c
Message-ID:  <20000428221611.D17098@strontium.scientia.demon.co.uk>
In-Reply-To: <200004281531.IAA14106@freefall.freebsd.org>
References:  <200004281531.IAA14106@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

-- 
Ben Smithurst / ben@scientia.demon.co.uk / PGP: 0x99392F7D


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?20000428221611.D17098>