diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2010-08-20 06:56:55 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2010-08-20 06:56:55 +0000 |
commit | b66395951b72dc01c1c701741ca3b581704079c1 (patch) | |
tree | 11a115fa7abb34a791f33e888d589ba480b77f40 /usr.bin | |
parent | 1c3f432b548443ddbc91a674e4e6855b3205ae73 (diff) |
polish the code: remove few unused #includes, add missing ones,
fix NULL vs 0, etc. No behaviour change.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/aucat/aucat.c | 5 | ||||
-rw-r--r-- | usr.bin/aucat/file.c | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/aucat/aucat.c b/usr.bin/aucat/aucat.c index 37ef703d0d3..256e4291e32 100644 --- a/usr.bin/aucat/aucat.c +++ b/usr.bin/aucat/aucat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aucat.c,v 1.103 2010/08/19 06:31:06 ratchov Exp $ */ +/* $OpenBSD: aucat.c,v 1.104 2010/08/20 06:56:54 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -30,7 +30,6 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> -#include <varargs.h> #include "abuf.h" #include "aparams.h" @@ -181,7 +180,7 @@ opt_mode(void) char *p = optarg; size_t len; - for (p = optarg; *p != NULL; p++) { + for (p = optarg; *p != '\0'; p++) { len = strcspn(p, ","); if (strncmp("play", p, len) == 0) { mode |= MODE_PLAY; diff --git a/usr.bin/aucat/file.c b/usr.bin/aucat/file.c index e1eefa8d8ae..d19a6685e38 100644 --- a/usr.bin/aucat/file.c +++ b/usr.bin/aucat/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.21 2010/07/10 12:32:45 ratchov Exp $ */ +/* $OpenBSD: file.c,v 1.22 2010/08/20 06:56:54 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -46,6 +46,7 @@ * */ +#include <sys/time.h> #include <sys/types.h> #include <err.h> @@ -55,6 +56,7 @@ #include <signal.h> #include <stdio.h> #include <stdlib.h> +#include <time.h> #include "abuf.h" #include "aproc.h" @@ -357,7 +359,7 @@ file_poll(void) } } f = LIST_FIRST(&file_list); - while (f != LIST_END(&file_list)) { + while (f != NULL) { if (f->pfd == NULL) { f = LIST_NEXT(f, entry); continue; |