Blame SOURCES/autofs-5.0.7-fix-a-couple-of-compiler-warnings.patch

ab3a3d
autofs-5.0.7 - fix a couple of compiler warnings
ab3a3d
ab3a3d
From: Ian Kent <ikent@redhat.com>
ab3a3d
ab3a3d
Quiet a couple of ompiler warnings by making intention explicit using brackets.
ab3a3d
---
ab3a3d
 CHANGELOG            |    1 +
ab3a3d
 modules/mount_bind.c |    2 +-
ab3a3d
 modules/mount_nfs.c  |    4 ++--
ab3a3d
 3 files changed, 4 insertions(+), 3 deletions(-)
ab3a3d
ab3a3d
diff --git a/CHANGELOG b/CHANGELOG
ab3a3d
index 37eac72..7749f01 100644
ab3a3d
--- a/CHANGELOG
ab3a3d
+++ b/CHANGELOG
ab3a3d
@@ -54,6 +54,7 @@
ab3a3d
 - misc man page fixes.
ab3a3d
 - fix add null check in parse_server_string().
ab3a3d
 - don't override LDFLAGS in make rules.
ab3a3d
+- fix a couple of compiler warnings.
ab3a3d
 
ab3a3d
 25/07/2012 autofs-5.0.7
ab3a3d
 =======================
ab3a3d
diff --git a/modules/mount_bind.c b/modules/mount_bind.c
ab3a3d
index 61a773c..2b70104 100644
ab3a3d
--- a/modules/mount_bind.c
ab3a3d
+++ b/modules/mount_bind.c
ab3a3d
@@ -208,7 +208,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
ab3a3d
 			      MODPREFIX
ab3a3d
 			      "failed to create local mount %s -> %s",
ab3a3d
 			      fullpath, what);
ab3a3d
-			if (ap->flags & MOUNT_FLAG_GHOST && !status)
ab3a3d
+			if ((ap->flags & MOUNT_FLAG_GHOST) && !status)
ab3a3d
 				if (mkdir_path(fullpath, 0555) && errno != EEXIST) {
ab3a3d
 					char *estr = strerror_r(errno, buf, MAX_ERR_BUF);
ab3a3d
 					error(ap->logopt,
ab3a3d
diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c
ab3a3d
index 3d2ccea..adf2002 100644
ab3a3d
--- a/modules/mount_nfs.c
ab3a3d
+++ b/modules/mount_nfs.c
ab3a3d
@@ -202,8 +202,8 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
ab3a3d
 	 */
ab3a3d
 	if ((hosts && !hosts->next) &&
ab3a3d
 	    mount_default_proto == 4 &&
ab3a3d
-	    vers & NFS_VERS_MASK != 0 &&
ab3a3d
-	    vers & NFS4_VERS_MASK != 0) {
ab3a3d
+	    (vers & NFS_VERS_MASK) != 0 &&
ab3a3d
+	    (vers & NFS4_VERS_MASK) != 0) {
ab3a3d
 		unsigned int v4_probe_ok = 0;
ab3a3d
 		struct host *tmp = new_host(hosts->name,
ab3a3d
 					    hosts->addr, hosts->addr_len,