Source-Changes archive

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

CVS commit: src/usr.bin/config



Module Name:    src
Committed By:   dsl
Date:           Wed Oct  4 20:34:48 UTC 2006

Modified Files:
        src/usr.bin/config: main.c mkdevsw.c mkheaders.c mkioconf.c
            mkmakefile.c mkswap.c

Log Message:
Instead of trying to check the return value of every fprintf() and fputs()
call - which makes the code completely impossibly to follow, call fflush()
and ferror() just prior to calling fclose().
This has the advantage of actually detecting the any write errors, since
the output is block bufferred and will typically not happen during fprintf()
but only during the fclose() - where it is difficult to report.
I also singlilarly refuse to add (void) casts to every printf call in the
system - since it almost never makes any sense to look at the return value
(unless you want to know how many bytes were actually writtem).


To generate a diff of this commit:
cvs rdiff -r1.16 -r1.17 src/usr.bin/config/main.c
cvs rdiff -r1.2 -r1.3 src/usr.bin/config/mkdevsw.c
cvs rdiff -r1.8 -r1.9 src/usr.bin/config/mkheaders.c
cvs rdiff -r1.7 -r1.8 src/usr.bin/config/mkioconf.c
cvs rdiff -r1.4 -r1.5 src/usr.bin/config/mkmakefile.c
cvs rdiff -r1.1 -r1.2 src/usr.bin/config/mkswap.c

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




Home | Main Index | Thread Index | Old Index