From owner-freebsd-audit Mon Jul 15 8:14:10 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F5E237B400; Mon, 15 Jul 2002 08:14:08 -0700 (PDT) Received: from xerxes.courtesan.com (courtesan.com [206.168.103.86]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29E1443E3B; Mon, 15 Jul 2002 08:14:07 -0700 (PDT) (envelope-from Todd.Miller@courtesan.com) Received: from xerxes.courtesan.com (IDENT:millert@localhost.courtesan.com [127.0.0.1]) by xerxes.courtesan.com (8.12.5/8.12.5) with ESMTP id g6FFE3BI007055; Mon, 15 Jul 2002 09:14:03 -0600 (MDT) Message-Id: <200207151514.g6FFE3BI007055@xerxes.courtesan.com> To: "M. Warner Losh" Cc: keramida@FreeBSD.ORG, bde@zeta.org.au, des@ofug.org, freebsd-audit@FreeBSD.ORG Subject: Re: bin/ln & WARNS=5 In-reply-to: Your message of "Mon, 15 Jul 2002 09:04:20 MDT." <20020715.090420.83279095.imp@bsdimp.com> References: <20020715202126.S40071-100000@gamplex.bde.org> <20020715111436.GD50130@hades.hell.gr> <20020715.090420.83279095.imp@bsdimp.com> Date: Mon, 15 Jul 2002 09:14:03 -0600 From: "Todd C. Miller" Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20020715.090420.83279095.imp@bsdimp.com> so spake "M. Warner Losh" (imp): > snprintf never returns a negative number. It always returns the > number of characters that it would have used to make the string. Actually, on Solaris snprintf can return -1 due to an incorrect locale-specific format string, although this does not appear to be documented. And of course, Single Unix used to specify that -1 was returned when out of space. If you are trying for "extreme portability" you might care. - todd To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message