From e4644f54ec33b6c94f0610e53ef27f32edf64023 Mon Sep 17 00:00:00 2001 From: Philip Guenther Date: Sun, 11 Oct 2015 00:20:30 +0000 Subject: Prefer dprintf() over snprintf()+write() ok beck@ deraadt@ --- sbin/newfs/mkfs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sbin/newfs') 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 -- cgit v1.2.3