=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/doas/doas.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- src/usr.bin/doas/doas.c 2015/08/12 15:59:53 1.35 +++ src/usr.bin/doas/doas.c 2015/08/13 16:27:22 1.36 @@ -1,4 +1,4 @@ -/* $OpenBSD: doas.c,v 1.35 2015/08/12 15:59:53 espie Exp $ */ +/* $OpenBSD: doas.c,v 1.36 2015/08/13 16:27:22 espie Exp $ */ /* * Copyright (c) 2015 Ted Unangst * @@ -161,13 +161,9 @@ struct stat sb; yyfp = fopen(filename, "r"); - if (!yyfp) { - if (checkperms) - warn("doas is not enabled, %s", filename); - else - warn("could not open config file %s", filename); - exit(1); - } + if (!yyfp) + err(1, checkperms ? "doas is not enabled, %s" : + "could not open config file %s", filename); if (checkperms) { if (fstat(fileno(yyfp), &sb) != 0)