Date: Mon, 14 Jun 1999 10:29:28 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Nate Eldredge cc: djgpp-workers AT delorie DOT com, Alain Magloire Subject: Re: {v,}snprintf.c ??? In-Reply-To: <37643242.C52AE48F@cartsys.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sun, 13 Jun 1999, Nate Eldredge wrote: > glibc does as you expected: it returns the number of characters without > touching the buffer. (You can even pass NULL.) That's what C9X seems to imply, including the NULL pointer. Thanks for checking. > I think the cast to signed int is bogus too. If we don't need to compare it with 1, the cast can go away as well. Since the prototype uses size_t, it is clear the function expects an unsigned value, so passing a negative value is looking for trouble anyway.