From owner-freebsd-hackers Fri Sep 7 23:50:41 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from maxim.gbch.net (gw.gbch.net [203.24.22.66]) by hub.freebsd.org (Postfix) with SMTP id 2BA6037B401 for ; Fri, 7 Sep 2001 23:50:37 -0700 (PDT) Received: (qmail 93614 invoked by uid 1001); 8 Sep 2001 16:50:35 +1000 Message-ID: X-Posted-By: GJB-Post 2.21 16-Jun-2001 X-Operating-System: FreeBSD 4.2-RELEASE i386 X-Location: Brisbane, Australia; 27.49841S 152.98439E X-URL: http://www.gbch.net/gjb.html X-Image-URL: http://www.gbch.net/gjb/gjb-auug048.gif X-GPG-Fingerprint: EBB2 2A92 A79D 1533 AC00 3C46 5D83 B6FB 4B04 B7D6 X-PGP-Public-Keys: http://www.gbch.net/keys.html Date: Sat, 08 Sep 2001 16:50:34 +1000 From: Greg Black To: Bill Swingle Cc: FreeBSD Hackers Subject: Re: tiny patch to pkg_add References: <20010907150416.A38565@dub.net> <20010907151935.A40146@dub.net> In-reply-to: <20010907151935.A40146@dub.net> of Fri, 07 Sep 2001 15:19:35 MST Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 Bill Swingle wrote: | > - strlcpy(packagesite, "", sizeof(packagesite)); | | Chris Costello recommended that I do this like this instead: | | packagesite[0] = '\0' | | Which seems to make sense since it lacks the overhead of strlcpy. Is | there a "right" way to do this? A C programmer would do it the way Chris suggested. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message