summaryrefslogtreecommitdiffstats
path: root/usr.sbin/amd
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2014-10-26 01:22:34 +0000
committerguenther <guenther@openbsd.org>2014-10-26 01:22:34 +0000
commita067006be028df1f197e1d1212b1d1d1fc571ae0 (patch)
tree0ca96e47ec425bcc20f2fe4a1be0c2587dc80254 /usr.sbin/amd
parentReplace xrealloc() with xreallocarray(). Break-out the 'log and die' (diff)
downloadwireguard-openbsd-a067006be028df1f197e1d1212b1d1d1fc571ae0.tar.xz
wireguard-openbsd-a067006be028df1f197e1d1212b1d1d1fc571ae0.zip
Consistently use the extra parens in 'if ((var = hasmntval(...)))' to
suppress compiler warnings. Noted with gcc -Wall, then prodded by brad@ and clang
Diffstat (limited to 'usr.sbin/amd')
-rw-r--r--usr.sbin/amd/amd/nfs_ops.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/amd/amd/nfs_ops.c b/usr.sbin/amd/amd/nfs_ops.c
index 9ea9cf3aab5..da62d818122 100644
--- a/usr.sbin/amd/amd/nfs_ops.c
+++ b/usr.sbin/amd/amd/nfs_ops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_ops.c,v 1.22 2014/10/26 01:16:48 guenther Exp $ */
+/* $OpenBSD: nfs_ops.c,v 1.23 2014/10/26 01:22:34 guenther Exp $ */
/*-
* Copyright (c) 1990 Jan-Simon Pendry
@@ -526,7 +526,7 @@ mount_nfs_fh(fhstatus *fhp, char *dir, char *fs_name, char *opts,
nfs_args.flags |= NFSMNT_RETRANS;
#ifdef NFSMNT_BIODS
- if (nfs_args.biods = hasmntval(&mnt, "biods"))
+ if ((nfs_args.biods = hasmntval(&mnt, "biods")))
nfs_args.flags |= NFSMNT_BIODS;
#endif /* NFSMNT_BIODS */
@@ -537,7 +537,7 @@ mount_nfs_fh(fhstatus *fhp, char *dir, char *fs_name, char *opts,
#endif /* NFSMNT_MAXGRPS */
#ifdef NFSMNT_READAHEAD
- if (nfs_args.readahead = hasmntval(&mnt, "readahead"))
+ if ((nfs_args.readahead = hasmntval(&mnt, "readahead")))
nfs_args.flags |= NFSMNT_READAHEAD;
#endif /* NFSMNT_READAHEAD */
@@ -546,7 +546,7 @@ mount_nfs_fh(fhstatus *fhp, char *dir, char *fs_name, char *opts,
* This isn't supported by the ping algorithm yet.
* In any case, it is all done in nfs_init().
*/
- if (port = hasmntval(&mnt, "port"))
+ if ((port = hasmntval(&mnt, "port")))
sin.sin_port = htons(port);
else
sin.sin_port = htons(NFS_PORT); /* XXX should use portmapper */
@@ -581,7 +581,7 @@ mount_nfs_fh(fhstatus *fhp, char *dir, char *fs_name, char *opts,
nfs_args.flags |= NFSMNT_RESVPORT;
#ifdef NFSMNT_PGTHRESH
- if (nfs_args.pg_thresh = hasmntval(&mnt, "pgthresh"))
+ if ((nfs_args.pg_thresh = hasmntval(&mnt, "pgthresh")))
nfs_args.flags |= NFSMNT_PGTHRESH;
#endif /* NFSMNT_PGTHRESH */