opendoas

A portable version of the OpenBSD `doas` command
git clone https://pi.duncano.de/git/opendoas.git
Log | Files | Refs | README | LICENSE

commit 92f869cf0ae0aa1493a6eefaac253bce2afd9178
parent 63916476e2cfa9402bbe21be29dee2a7d60d775e
Author: Ted Unangst <tedu@openbsd.org>
Date:   Thu, 16 Jul 2015 21:00:59 +0000

combine fprintfs and use a constant format string. hint from reyk

Diffstat:
doas.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/doas.c b/doas.c @@ -1,4 +1,4 @@ -/* $OpenBSD$ */ +/* $OpenBSD: doas.c,v 1.1 2015/07/16 20:44:21 tedu Exp $ */ /* * Copyright (c) 2015 Ted Unangst <tedu@openbsd.org> * @@ -238,8 +238,7 @@ fail(void) const char *m; m = msgs[arc4random_uniform(sizeof(msgs) / sizeof(msgs[0]))]; - fprintf(stderr, m); - fprintf(stderr, "\n"); + fprintf(stderr, "%s\n", m); exit(1); }