diff options
author | 2002-06-08 23:23:24 +0000 | |
---|---|---|
committer | 2002-06-08 23:23:24 +0000 | |
commit | eaf9a761d3c5f849c8f8011701cb322fc8f9cd1b (patch) | |
tree | ca0dd914261949089ea37d6891bacec52c194e46 | |
parent | sync (diff) | |
download | wireguard-openbsd-eaf9a761d3c5f849c8f8011701cb322fc8f9cd1b.tar.xz wireguard-openbsd-eaf9a761d3c5f849c8f8011701cb322fc8f9cd1b.zip |
o Replace some hard-coded octal constants w/ S_I*
o Remove some unneeded casts to char * when calling free()
-rw-r--r-- | usr.sbin/lpr/common_source/displayq.c | 8 | ||||
-rw-r--r-- | usr.sbin/lpr/lpd/printjob.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/lpr/common_source/displayq.c b/usr.sbin/lpr/common_source/displayq.c index a58abcb56b8..eea7ea09b26 100644 --- a/usr.sbin/lpr/common_source/displayq.c +++ b/usr.sbin/lpr/common_source/displayq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: displayq.c,v 1.18 2002/06/08 01:53:43 millert Exp $ */ +/* $OpenBSD: displayq.c,v 1.19 2002/06/08 23:23:24 millert Exp $ */ /* $NetBSD: displayq.c,v 1.21 2001/08/30 00:51:50 itojun Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static const char sccsid[] = "@(#)displayq.c 8.4 (Berkeley) 4/28/95"; #else -static const char rcsid[] = "$OpenBSD: displayq.c,v 1.18 2002/06/08 01:53:43 millert Exp $"; +static const char rcsid[] = "$OpenBSD: displayq.c,v 1.19 2002/06/08 23:23:24 millert Exp $"; #endif #endif /* not lint */ @@ -151,7 +151,7 @@ displayq(int format) ret = stat(LO, &statb); PRIV_END; if (ret >= 0) { - if (statb.st_mode & 0100) { + if (statb.st_mode & S_IXUSR) { if (remote) printf("%s: ", host); printf("Warning: %s is down: ", printer); @@ -165,7 +165,7 @@ displayq(int format) } else putchar('\n'); } - if (statb.st_mode & 010) { + if (statb.st_mode & S_IXGRP) { if (remote) printf("%s: ", host); printf("Warning: %s queue is turned off\n", printer); diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c index 8e0bce7da8e..6efe8e00006 100644 --- a/usr.sbin/lpr/lpd/printjob.c +++ b/usr.sbin/lpr/lpd/printjob.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printjob.c,v 1.33 2002/06/08 01:53:43 millert Exp $ */ +/* $OpenBSD: printjob.c,v 1.34 2002/06/08 23:23:24 millert Exp $ */ /* $NetBSD: printjob.c,v 1.31 2002/01/21 14:42:30 wiz Exp $ */ /* @@ -227,7 +227,7 @@ again: * write the name of the current control file into the lock file * so the spool queue program can tell what we're working on */ - for (qp = queue; nitems--; free((char *) q)) { + for (qp = queue; nitems--; free(q)) { q = *qp++; if (stat(q->q_name, &stb) < 0) continue; @@ -253,7 +253,7 @@ again: goto done; /* rebuild queue (after lpc topq) */ if (stb.st_mode & S_IXOTH) { - for (free((char *) q); nitems--; free((char *) q)) + for (free(q); nitems--; free(q)) q = *qp++; stb.st_mode &= ~S_IXOTH; if (fchmod(lfd, stb.st_mode & 0777) < 0) @@ -296,7 +296,7 @@ again: } } } - free((char *) queue); + free(queue); /* * search the spool directory for more work. */ |