Date: Sat, 8 Sep 2001 01:02:43 +0100 From: Josef Karthauser <joe@tao.org.uk> To: Bill Swingle <unfurl@dub.net> Cc: FreeBSD Hackers <hackers@freebsd.org> Subject: Re: tiny patch to pkg_add Message-ID: <20010908010243.V3148@tao.org.uk> In-Reply-To: <20010907150416.A38565@dub.net>; from unfurl@dub.net on Fri, Sep 07, 2001 at 03:04:16PM -0700 References: <20010907150416.A38565@dub.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--7fXEoLLey27Fs/d6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 07, 2001 at 03:04:16PM -0700, Bill Swingle wrote: > Anyway, it's an easy fix but my real question is, is this the correct > way to destroy the value of a variable in C? Here's my patch: >=20 > --- src/usr.sbin/pkg_install/add/main.c Fri Sep 7 15:02:17 2001 > +++ src/usr.sbin/pkg_install/add/main.c.orig Fri Sep 7 13:11:40 2001 > @@ -189,7 +189,6 @@ > } > } > } > - strlcpy(packagesite, "", sizeof(packagesite)); > } > } > /* If no packages, yelp */ Surely: *packagesite =3D '\0'; would do just as well? Joe --7fXEoLLey27Fs/d6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjuZYCIACgkQXVIcjOaxUBblCwCeKxr8xig+RDfWnC9eTjwyNKoC JyIAoNLezN2+Ax+n7WpTORkg0v+gD+tM =s0KF -----END PGP SIGNATURE----- --7fXEoLLey27Fs/d6-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010908010243.V3148>