Make sure the correct errno is reported by warn* or err* and not
authorguenther <guenther@openbsd.org>
Sun, 20 Jul 2014 01:38:40 +0000 (01:38 +0000)
committerguenther <guenther@openbsd.org>
Sun, 20 Jul 2014 01:38:40 +0000 (01:38 +0000)
commitffb4dd050d1e35f39b1d6c1c600db7c6443475c2
tree0e41db8f3c733eb324a6a362a29149f077ad4c74
parent50b7afb2c2c0993b0894d4e34bf857cb13ed9c80
Make sure the correct errno is reported by warn* or err* and not
the errno of an intervening cleanup operation like close/unlink/etc.

Diff from Doug Hogan (doug (at) acyclic.org)
21 files changed:
bin/systrace/intercept.c
regress/lib/libc/stdio_threading/fgetln/fgetln_test.c
regress/lib/libc/stdio_threading/fgets/fgets_test.c
regress/lib/libc/stdio_threading/fputs/fputs_test.c
regress/lib/libc/stdio_threading/fread/fread_test.c
regress/lib/libc/stdio_threading/fwrite/fwrite_test.c
regress/lib/libc/stdio_threading/include/local.h
regress/sys/kern/getpeereid/getpeereid_test.c
sbin/bioctl/bioctl.c
sbin/disklabel/disklabel.c
sbin/newfs/newfs.c
sbin/restore/dirs.c
usr.bin/indent/indent.c
usr.bin/nc/netcat.c
usr.sbin/edquota/edquota.c
usr.sbin/ikectl/ikeca.c
usr.sbin/kvm_mkdb/kvm_mkdb.c
usr.sbin/lpr/common_source/startdaemon.c
usr.sbin/smtpd/enqueue.c
usr.sbin/smtpd/smtpctl.c
usr.sbin/user/user.c