From owner-svn-src-all@freebsd.org Sat Dec 19 01:52:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 804E3A4CAF6 for ; Sat, 19 Dec 2015 01:52:23 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1.freebsd.org (Postfix) with SMTP id 33BB319AE for ; Sat, 19 Dec 2015 01:52:22 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: (qmail 20713 invoked by uid 99); 19 Dec 2015 01:52:21 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Dec 2015 01:52:21 +0000 Received: from [192.168.0.103] (unknown [181.55.232.163]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id BA7A61A0453; Sat, 19 Dec 2015 01:52:20 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r292454 - head/bin/ed From: Pedro Giffuni In-Reply-To: Date: Fri, 18 Dec 2015 20:52:17 -0500 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <3C185FD1-F245-4B75-9CE6-CD217AF94B28@FreeBSD.org> References: <201512182158.tBILwhRB040583@repo.freebsd.org> <44E9BE06-1883-4AF8-816D-D699CF733EEB@bsdimp.com> To: cem@FreeBSD.org X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Dec 2015 01:52:23 -0000 > Il giorno 18/dic/2015, alle ore 18:46, Conrad Meyer = ha scritto: >=20 > On Fri, Dec 18, 2015 at 2:44 PM, Pedro Giffuni = wrote: >> Hi Warner; >>=20 >>> Il giorno 18/dic/2015, alle ore 17:01, Warner Losh = ha scritto: >>>=20 >>> Isn=E2=80=99t strlcpy() the more appropriate interface? strncpy = doesn=E2=80=99t guarantee NUL termination. >>>=20 >>=20 >> Maybe, but we were using strcpy() which doesn=E2=80=99t guarantee = NULL termination either >> and things have been working. I also thought that portability may be = specially important >> for the stuff in bin/. >=20 > strcpy() does guarantee NUL termination. Otherwise it would be = useless. >=20 Yes , my bad. I come from a non-C background and sometimes tend to (erronously) think = the C library designers would keep some consistency :-/. I changed it to strlcpy() a while ago. Pedro.