Re: Suspend2 2.1.9.8 for 2.6.12: 603-suspend2_common-headers.patch

From: Pekka J Enberg
Date: Wed Jul 06 2005 - 11:10:08 EST


On Wed, 2005-07-06 at 20:22, Pekka Enberg wrote:
> > +
> > +extern int suspend_snprintf(char * buffer, int buffer_size, const char *fmt, ...);
> > What's wrong with regular snprintf?

Nigel Cunningham writes:
If there's a buffer overrun, it returns the number of bytes it wanted to
use, not the number actually used.

But on buffer overrun, you know it wrote size-1 characters. I am unconvinced you need a special snprintf() for suspend. Are there other potential users? If not, please consider dropping suspend_snprintf completelely.

Pekka -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/