aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/gmon
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>2002-02-15 02:28:50 +0000
committerBruce Evans <bde@FreeBSD.org>2002-02-15 02:28:50 +0000
commit2c316efdf3be2b1539b94e3264f3eebb1a4c40ee (patch)
tree03b2cda8a7003a107315aec33e23e20788eb3292 /lib/libc/gmon
parenta6959af6b1ec57b93589a4787ba6514dfe0aefe2 (diff)
downloadsrc-2c316efdf3be2b1539b94e3264f3eebb1a4c40ee.tar.gz
src-2c316efdf3be2b1539b94e3264f3eebb1a4c40ee.zip
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().
Notes
Notes: svn path=/head/; revision=90667
Diffstat (limited to 'lib/libc/gmon')
-rw-r--r--lib/libc/gmon/gmon.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libc/gmon/gmon.c b/lib/libc/gmon/gmon.c
index e82561934579..f25cbabc58a5 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",