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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
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:
>
> --- 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 = '\0';
would do just as well?
Joe
[-- Attachment #2 --]
-----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-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010908010243.V3148>
