diff options
author | tg <tg@FreeBSD.org> | 2001-07-24 11:50:23 +0000 |
---|---|---|
committer | tg <tg@FreeBSD.org> | 2001-07-24 11:50:23 +0000 |
commit | 47c2c99b5115c72bc1c4ad5ba8e7d21169d982ae (patch) | |
tree | f69b902c12889e39d57e3d83d55293ee0abee74b /usr.bin/doscmd/config.c | |
parent | 97507091ff20d3dc72113dfbd0c9532423d3acb4 (diff) | |
download | FreeBSD-src-47c2c99b5115c72bc1c4ad5ba8e7d21169d982ae.zip FreeBSD-src-47c2c99b5115c72bc1c4ad5ba8e7d21169d982ae.tar.gz |
Clean up the code a bit:
- add $FreeBSD$;
- remove unused variables;
- add missing headers and prototypes;
- -Wshadow.
Diffstat (limited to 'usr.bin/doscmd/config.c')
-rw-r--r-- | usr.bin/doscmd/config.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/usr.bin/doscmd/config.c b/usr.bin/doscmd/config.c index dd1316f..fd2332b 100644 --- a/usr.bin/doscmd/config.c +++ b/usr.bin/doscmd/config.c @@ -32,12 +32,18 @@ * $FreeBSD$ */ -#include <stdio.h> +#include <sys/types.h> +#include <sys/uio.h> #include <ctype.h> +#include <stdio.h> #include <string.h> -#include <sys/types.h> +#include <unistd.h> #include "doscmd.h" +#include "com.h" +#include "cwd.h" +#include "tty.h" +#include "video.h" /* ** doscmdrc parser @@ -52,7 +58,7 @@ read_config(FILE *fp) int ac; int bootdrive = -1; - while (buffer = fgets(_buffer, sizeof(_buffer), fp)) { + while ((buffer = fgets(_buffer, sizeof(_buffer), fp)) != 0) { char *comment = strchr(buffer, '#'); char *equal; @@ -195,7 +201,6 @@ init_hard: int port; int addr; unsigned char irq; - int i; if ((ac != 5) || (!isdigit(av[1][3]))) { fprintf(stderr, "Usage: assign com[1-4] path addr irq\n"); |