diff options
author | bde <bde@FreeBSD.org> | 2002-02-15 02:28:50 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2002-02-15 02:28:50 +0000 |
commit | e5f3532cbc4bd2aababe7917cab38294eb64edc8 (patch) | |
tree | 03b2cda8a7003a107315aec33e23e20788eb3292 /lib/libc | |
parent | a79720b9ae7b645f3f3b28182c02393b7c40df48 (diff) | |
download | FreeBSD-src-e5f3532cbc4bd2aababe7917cab38294eb64edc8.zip FreeBSD-src-e5f3532cbc4bd2aababe7917cab38294eb64edc8.tar.gz |
Fixed style bugs in rev.1.5:
- missing whitespace
- strange version of warn() built out of warnx() + strerror(). Just use
warn().
- conversion of just one of the two perror()'s to warn*()
Actually use _warn() instead of _warn(), to keep up with namespace-
unpollution for warn().
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gmon/gmon.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libc/gmon/gmon.c b/lib/libc/gmon/gmon.c index e825619..f25cbab 100644 --- a/lib/libc/gmon/gmon.c +++ b/lib/libc/gmon/gmon.c @@ -43,8 +43,9 @@ __FBSDID("$FreeBSD$"); #include <sys/gmon.h> #include <sys/sysctl.h> +#include "namespace.h" #include <err.h> -#include <errno.h> +#include "un-namespace.h" #include <stdio.h> #include <fcntl.h> #include <string.h> @@ -174,16 +175,16 @@ _mcleanup() } moncontrol(0); - snprintf(outname,sizeof(outname),"%s.gmon",__progname); + snprintf(outname, sizeof(outname), "%s.gmon", __progname); fd = _open(outname, O_CREAT|O_TRUNC|O_WRONLY, 0666); if (fd < 0) { - warnx("_mcleanup: %s - %s",outname,strerror(errno)); + _warn("_mcleanup: %s", outname); return; } #ifdef DEBUG log = _open("gmon.log", O_CREAT|O_TRUNC|O_WRONLY, 0664); if (log < 0) { - perror("_mcleanup: gmon.log"); + _warn("_mcleanup: gmon.log"); return; } len = sprintf(buf, "[mcleanup1] kcount 0x%x ssiz %d\n", |