Blame SOURCES/autofs-5.1.7-remove-redundant-if-check.patch

96dc52
autofs-5.1.7 - remove redundant if check
96dc52
96dc52
From: Ian Kent <raven@themaw.net>
96dc52
96dc52
Coverity: identical code in if condition branches.
96dc52
96dc52
Signed-off-by: Ian Kent <raven@themaw.net>
96dc52
---
96dc52
 CHANGELOG       |    1 +
96dc52
 daemon/direct.c |    5 +----
96dc52
 2 files changed, 2 insertions(+), 4 deletions(-)
96dc52
96dc52
diff --git a/CHANGELOG b/CHANGELOG
96dc52
index 62a918a9..2186cbe3 100644
96dc52
--- a/CHANGELOG
96dc52
+++ b/CHANGELOG
96dc52
@@ -51,6 +51,7 @@
96dc52
 - remove mounts_mutex.
96dc52
 - remove unused variable from get_exports().
96dc52
 - add missing free in handle_mounts().
96dc52
+- remove redundant if check.
96dc52
 
96dc52
 25/01/2021 autofs-5.1.7
96dc52
 - make bind mounts propagation slave by default.
96dc52
diff --git a/daemon/direct.c b/daemon/direct.c
96dc52
index 3f4f5704..a33f9f91 100644
96dc52
--- a/daemon/direct.c
96dc52
+++ b/daemon/direct.c
96dc52
@@ -752,10 +752,7 @@ int mount_autofs_offset(struct autofs_point *ap, struct mapent *me)
96dc52
 
96dc52
 	ops->timeout(ap->logopt, ioctlfd, timeout);
96dc52
 	cache_set_ino_index(me->mc, me->key, st.st_dev, st.st_ino);
96dc52
-	if (ap->logopt & LOGOPT_DEBUG)
96dc52
-		notify_mount_result(ap, me->key, timeout, str_offset);
96dc52
-	else
96dc52
-		notify_mount_result(ap, me->key, timeout, str_offset);
96dc52
+	notify_mount_result(ap, me->key, timeout, str_offset);
96dc52
 	ops->close(ap->logopt, ioctlfd);
96dc52
 
96dc52
 	debug(ap->logopt, "mounted trigger %s", me->key);