Blob Blame History Raw
autofs-5.1.7 - remove redundant if check

From: Ian Kent <raven@themaw.net>

Coverity: identical code in if condition branches.

Signed-off-by: Ian Kent <raven@themaw.net>
---
 CHANGELOG       |    1 +
 daemon/direct.c |    5 +----
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 62a918a9..2186cbe3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -51,6 +51,7 @@
 - remove mounts_mutex.
 - remove unused variable from get_exports().
 - add missing free in handle_mounts().
+- remove redundant if check.
 
 25/01/2021 autofs-5.1.7
 - make bind mounts propagation slave by default.
diff --git a/daemon/direct.c b/daemon/direct.c
index 3f4f5704..a33f9f91 100644
--- a/daemon/direct.c
+++ b/daemon/direct.c
@@ -752,10 +752,7 @@ int mount_autofs_offset(struct autofs_point *ap, struct mapent *me)
 
 	ops->timeout(ap->logopt, ioctlfd, timeout);
 	cache_set_ino_index(me->mc, me->key, st.st_dev, st.st_ino);
-	if (ap->logopt & LOGOPT_DEBUG)
-		notify_mount_result(ap, me->key, timeout, str_offset);
-	else
-		notify_mount_result(ap, me->key, timeout, str_offset);
+	notify_mount_result(ap, me->key, timeout, str_offset);
 	ops->close(ap->logopt, ioctlfd);
 
 	debug(ap->logopt, "mounted trigger %s", me->key);