diff options
author | 1997-07-09 00:28:18 +0000 | |
---|---|---|
committer | 1997-07-09 00:28:18 +0000 | |
commit | b0f29dd7fdc54fae18c4ad8af2c7182822d83ca5 (patch) | |
tree | d8f675f872a9e2b6144d9effa31125cfa640dc82 /lib/libc/gen/fstab.c | |
parent | Clarify strncat(3) count param. (diff) | |
download | wireguard-openbsd-b0f29dd7fdc54fae18c4ad8af2c7182822d83ca5.tar.xz wireguard-openbsd-b0f29dd7fdc54fae18c4ad8af2c7182822d83ca5.zip |
Clean up some -Wall complaints.
Diffstat (limited to 'lib/libc/gen/fstab.c')
-rw-r--r-- | lib/libc/gen/fstab.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc/gen/fstab.c b/lib/libc/gen/fstab.c index d9d87de270d..98cd34302ff 100644 --- a/lib/libc/gen/fstab.c +++ b/lib/libc/gen/fstab.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: fstab.c,v 1.5 1997/06/14 01:42:09 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: fstab.c,v 1.6 1997/07/09 00:28:19 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -76,9 +76,9 @@ fstabscan() _fs_fstab.fs_vfstype = strcmp(_fs_fstab.fs_type, FSTAB_SW) ? "ufs" : "swap"; - if (cp = strtok((char *)NULL, ":\n")) { + if ((cp = strtok((char *)NULL, ":\n"))) { _fs_fstab.fs_freq = atoi(cp); - if (cp = strtok((char *)NULL, ":\n")) { + if ((cp = strtok((char *)NULL, ":\n"))) { _fs_fstab.fs_passno = atoi(cp); return(1); } @@ -144,8 +144,8 @@ bad: /* no way to distinguish between EOF and syntax error */ struct fstab * getfsent() { - if (!_fs_fp && !setfsent() || !fstabscan()) - return((struct fstab *)NULL); + if ((!_fs_fp && !setfsent()) || !fstabscan()) + return(NULL); return(&_fs_fstab); } @@ -178,7 +178,7 @@ setfsent() rewind(_fs_fp); return(1); } - if (_fs_fp = fopen(_PATH_FSTAB, "r")) + if ((_fs_fp = fopen(_PATH_FSTAB, "r"))) return(1); error(errno); return(0); |