diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2015-10-11 00:20:30 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2015-10-11 00:20:30 +0000 |
commit | e4644f54ec33b6c94f0610e53ef27f32edf64023 (patch) | |
tree | 37d675a1a17d61dc49c0d09fcab160b74b648bd4 /sbin/newfs | |
parent | af7fae3d4d1a74baf13a498e2ed1a1bceee63f2a (diff) |
Prefer dprintf() over snprintf()+write()
ok beck@ deraadt@
Diffstat (limited to 'sbin/newfs')
-rw-r--r-- | sbin/newfs/mkfs.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index 6452f8ab1cc..6ab3b55bfc8 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mkfs.c,v 1.92 2015/08/20 22:02:21 deraadt Exp $ */ +/* $OpenBSD: mkfs.c,v 1.93 2015/10/11 00:20:29 guenther Exp $ */ /* $NetBSD: mkfs.c,v 1.25 1995/06/18 21:35:38 cgd Exp $ */ /* @@ -154,11 +154,9 @@ void siginfo(int sig) { int save_errno = errno; - char buf[128]; - snprintf(buf, sizeof(buf), "%s: initializing cg %ld/%d\n", + dprintf(STDERR_FILENO, "%s: initializing cg %ld/%d\n", cur_fsys, (long)cur_cylno, sblock.fs_ncg); - write(STDERR_FILENO, buf, strlen(buf)); errno = save_errno; } #endif |