diff options
author | phk <phk@FreeBSD.org> | 1995-10-22 14:37:11 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1995-10-22 14:37:11 +0000 |
commit | 5e221828f83731c9f6083e6ce9703c1251dba05a (patch) | |
tree | 021e4f00408640702c262fd5f8dc2c167a2c2c73 /lib/libc/gen/fstab.c | |
parent | 6a09eeb50d1e12bcfae0a9e782727c535dc609f5 (diff) | |
download | FreeBSD-src-5e221828f83731c9f6083e6ce9703c1251dba05a.zip FreeBSD-src-5e221828f83731c9f6083e6ce9703c1251dba05a.tar.gz |
Minor cleanup, mostly unused vars and missing #includes.
Diffstat (limited to 'lib/libc/gen/fstab.c')
-rw-r--r-- | lib/libc/gen/fstab.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/libc/gen/fstab.c b/lib/libc/gen/fstab.c index 47ad477..a526068 100644 --- a/lib/libc/gen/fstab.c +++ b/lib/libc/gen/fstab.c @@ -46,10 +46,10 @@ static FILE *_fs_fp; static struct fstab _fs_fstab; static int LineNo = 0; -static error __P((int)); -static fstabscan __P((void)); +static void error __P((int)); +static int fstabscan __P((void)); -static +static int fstabscan() { char *cp, *p; @@ -77,9 +77,9 @@ fstabscan() _fs_fstab.fs_vfstype = strcmp(_fs_fstab.fs_type, FSTAB_SW) ? "ufs" : "swap"; - if (cp = strsep(&p, ":\n")) { + if ((cp = strsep(&p, ":\n")) != NULL) { _fs_fstab.fs_freq = atoi(cp); - if (cp = strsep(&p, ":\n")) { + if ((cp = strsep(&p, ":\n")) != NULL) { _fs_fstab.fs_passno = atoi(cp); return(1); } @@ -157,7 +157,7 @@ bad: /* no way to distinguish between EOF and syntax error */ struct fstab * getfsent() { - if (!_fs_fp && !setfsent() || !fstabscan()) + if ((!_fs_fp && !setfsent()) || !fstabscan()) return((struct fstab *)NULL); return(&_fs_fstab); } @@ -184,6 +184,7 @@ getfsfile(name) return((struct fstab *)NULL); } +int setfsent() { if (_fs_fp) { @@ -191,7 +192,7 @@ setfsent() LineNo = 0; return(1); } - if (_fs_fp = fopen(_PATH_FSTAB, "r")) { + if ((_fs_fp = fopen(_PATH_FSTAB, "r")) != NULL) { LineNo = 0; return(1); } @@ -208,7 +209,7 @@ endfsent() } } -static +static void error(err) int err; { |