From owner-cvs-all Mon Aug 20 6:37:37 2001 Delivered-To: cvs-all@freebsd.org Received: from Awfulhak.org (gw.Awfulhak.org [217.204.245.18]) by hub.freebsd.org (Postfix) with ESMTP id 57EAE37B403; Mon, 20 Aug 2001 06:37:30 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [fec0::1:12]) by Awfulhak.org (8.11.5/8.11.5) with ESMTP id f7KDbJv11541; Mon, 20 Aug 2001 14:37:19 +0100 (BST) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.4/8.11.4) with ESMTP id f7KDbAU83638; Mon, 20 Aug 2001 14:37:10 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200108201337.f7KDbAU83638@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Maxim Sobolev Cc: brian@FreeBSD.ORG (Brian Somers), kris@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, brian@freebsd-services.com Subject: Re: cvs commit: src/sbin/newfs mkfs.c src/sbin/ping6 ping6.c In-Reply-To: Message from Maxim Sobolev of "Mon, 20 Aug 2001 16:10:37 +0300." <200108201311.f7KDBvH15963@vega.vega.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 20 Aug 2001 14:37:10 +0100 From: Brian Somers Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > > > brian 2001/08/20 05:56:45 PDT > > > > Modified files: > > sbin/newfs mkfs.c > > sbin/ping6 ping6.c > > sbin/route route.c > > Log: > > Handle snprintf() returning -1. > > What is condition for snprintf() returning -1? The manpage doesn't provide > any clue, so as the SUSv2 specification. Perhaps manpage should be extended > to be more clear in this area. From what I can tell, it can return -1 when it's given an invalid format string. It could probably do likewise for other reasons too (he says vaguely), depending on if vfprintf() decides to return EOF (this probably can't happen the way snprintf() sets the FILE up). I don't believe that any of the cases I've patched could actually happen at the moment using our libc, but it's possible that other snprintf() implementations may fail, so we should deal with that for portability's sake. > -Maxim -- Brian http://www.freebsd-services.com/ Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message