]> git.armaanb.net Git - opendoas.git/commitdiff
combine fprintfs and use a constant format string. hint from reyk
authorTed Unangst <tedu@openbsd.org>
Thu, 16 Jul 2015 21:00:59 +0000 (21:00 +0000)
committerTed Unangst <tedu@openbsd.org>
Thu, 16 Jul 2015 21:00:59 +0000 (21:00 +0000)
doas.c

diff --git a/doas.c b/doas.c
index 7c800bd15c146204e3c48bb85720dabd8c76ab52..c658e9cbe6d056221c7c530fb05479b366a08967 100644 (file)
--- 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);
 }