Subject: CVS commit: src/lib/libc/stdio
To: None <source-changes@NetBSD.org>
From: Christos Zoulas <christos@netbsd.org>
List: source-changes
Date: 06/22/2005 19:45:22
Module Name:	src
Committed By:	christos
Date:		Wed Jun 22 19:45:22 UTC 2005

Modified Files:
	src/lib/libc/stdio: fputs.c puts.c

Log Message:
If the string to be printed is NULL substitute "(null)". Approved by core.
This is a workaround to make gcc's behavior consistent, since gcc can
transform:
    printf("%s\n", s) -> puts(s)
    fprintf(fp, "%s", s) -> fputs(s, fp)
as an optimization.
I've left the _DIAGASSERT's that make sure that s != NULL alone because we
should really still abort in a debugging environment.


To generate a diff of this commit:
cvs rdiff -r1.13 -r1.14 src/lib/libc/stdio/fputs.c
cvs rdiff -r1.12 -r1.13 src/lib/libc/stdio/puts.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.