From owner-freebsd-hackers Fri Sep 7 17: 2:49 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from tao.org.uk (genius.tao.org.uk [212.135.162.51]) by hub.freebsd.org (Postfix) with ESMTP id D872E37B40B for ; Fri, 7 Sep 2001 17:02:44 -0700 (PDT) Received: by tao.org.uk (Postfix, from userid 100) id 20A4D2F1; Sat, 8 Sep 2001 01:02:43 +0100 (BST) Date: Sat, 8 Sep 2001 01:02:43 +0100 From: Josef Karthauser To: Bill Swingle Cc: FreeBSD Hackers Subject: Re: tiny patch to pkg_add Message-ID: <20010908010243.V3148@tao.org.uk> References: <20010907150416.A38565@dub.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="7fXEoLLey27Fs/d6" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010907150416.A38565@dub.net>; from unfurl@dub.net on Fri, Sep 07, 2001 at 03:04:16PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --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