[Top][All Lists]
[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
- Re: Good bits from Marcin's patch3, (continued)
Re: Good bits from Marcin's patch3, BORBELY Zoltan, 2002/04/03
Re: Good bits from Marcin's patch3, Pawel Kot, 2002/04/03
Re: Good bits from Marcin's patch3, Pawel Kot, 2002/04/03
Re: Good bits from Marcin's patch3, Pawel Kot, 2002/04/03
Re: Good bits from Marcin's patch3, Glenn Satchell, 2002/04/03
Re: Good bits from Marcin's patch3, Pawel Kot, 2002/04/03