summaryrefslogtreecommitdiffstats
path: root/usr.bin/nice/nice.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2002-06-17 07:06:12 +0000
committerderaadt <deraadt@openbsd.org>2002-06-17 07:06:12 +0000
commitab30f605e8ff423aab703581ecee003a3e5c29dc (patch)
tree20f01e126ff558807b81e028de05218012bb38c2 /usr.bin/nice/nice.c
parentAdd UK keymap (tested on PBG4). Since it doesn't have a # key, do like (diff)
downloadwireguard-openbsd-ab30f605e8ff423aab703581ecee003a3e5c29dc.tar.xz
wireguard-openbsd-ab30f605e8ff423aab703581ecee003a3e5c29dc.zip
KNF
Diffstat (limited to 'usr.bin/nice/nice.c')
-rw-r--r--usr.bin/nice/nice.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/usr.bin/nice/nice.c b/usr.bin/nice/nice.c
index ad498b1f9aa..fd3eee45c83 100644
--- a/usr.bin/nice/nice.c
+++ b/usr.bin/nice/nice.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nice.c,v 1.6 2002/02/16 21:27:50 millert Exp $ */
+/* $OpenBSD: nice.c,v 1.7 2002/06/17 07:06:25 deraadt Exp $ */
/* $NetBSD: nice.c,v 1.9 1995/08/31 23:30:58 jtc Exp $ */
/*
@@ -44,7 +44,7 @@ char copyright[] =
#if 0
static char sccsid[] = "@(#)nice.c 5.4 (Berkeley) 6/1/90";
#endif
-static char rcsid[] = "$OpenBSD: nice.c,v 1.6 2002/02/16 21:27:50 millert Exp $";
+static char rcsid[] = "$OpenBSD: nice.c,v 1.7 2002/06/17 07:06:25 deraadt Exp $";
#endif /* not lint */
#include <sys/time.h>
@@ -72,16 +72,17 @@ main(argc, argv)
setlocale(LC_ALL, "");
- /* handle obsolete -number syntax */
- if (argc > 1 && argv[1][0] == '-' && isdigit(argv[1][1])) {
- niceness = atoi (argv[1] + 1);
- argc--; argv++;
- }
+ /* handle obsolete -number syntax */
+ if (argc > 1 && argv[1][0] == '-' && isdigit(argv[1][1])) {
+ niceness = atoi(argv[1] + 1);
+ argc--;
+ argv++;
+ }
while ((c = getopt (argc, argv, "n:")) != -1) {
switch (c) {
case 'n':
- niceness = atoi (optarg);
+ niceness = atoi(optarg);
break;
case '?':
@@ -98,15 +99,14 @@ main(argc, argv)
errno = 0;
niceness += getpriority(PRIO_PROCESS, 0);
if (errno) {
- err (1, "getpriority");
+ err(1, "getpriority");
/* NOTREACHED */
}
- if (setpriority(PRIO_PROCESS, 0, niceness)) {
- warn ("setpriority");
- }
+ if (setpriority(PRIO_PROCESS, 0, niceness))
+ warn("setpriority");
execvp(argv[0], &argv[0]);
- err ((errno == ENOENT) ? 127 : 126, "%s", argv[0]);
+ err((errno == ENOENT) ? 127 : 126, "%s", argv[0]);
/* NOTREACHED */
}