lint question

Blair P. Houghton bph at buengc.BU.EDU
Fri Jan 20 03:24:31 AEST 1989


In article <1188 at dukeac.UUCP> bet at dukeac.UUCP (Bennett Todd) writes:
>*All* possible error routines should be checked, with only one exception that
>I know of:
>
>	if (fatal failure) {
>		(void) fprintf(stderr, "suitable error message");
>		exit(error_level);
>	}
>
>There's no point in checking for an error writing to stderr, since you
>couldn't report it anyway, and all you are going to do is exit.

Howsabout if the poor return from fprintf indicates that stderr is
missing, and you therefore specify logging the unreportable errors
to a file?

				--Blair



More information about the Comp.lang.c mailing list