gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: correct snprintf implementation


From: Pawel Kot
Subject: Re: correct snprintf implementation
Date: Thu, 4 Apr 2002 02:43:01 +0200 (CEST)

On Thu, 4 Apr 2002, BORBELY Zoltan wrote:

> Hello,
>
> On Wed, Apr 03, 2002 at 05:18:51PM +0200, Pawel Kot wrote:
> >     exit (!(buf[2] == 0) && !(snprintf(NULL, 0, "%d", 100)));
>
> It isn't correct (non C99 compliant snprintf will return -1).

Argh. My mistake. Should be:
exit (!(buf[2] == 0) && !(snprintf(NULL, 0, "%d", 100) == 3));
Is it correct now?

pkot
-- 
mailto:address@hidden :: mailto:address@hidden
http://kt.linuxnews.pl/ :: Kernel Traffic po polsku




reply via email to

[Prev in Thread] Current Thread [Next in Thread]