Skip to contentSkip to conversation

mountd: Remove outdated/misleading comment

PATCH In review Christian Bartolomäus 2 participants 2 messages Jan 7, 2020 – Jan 16, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mountd: Remove outdated/misleading comment

It became wrong when commit 78240c41be17bd20d5fb5b70b6f470d8e779adee ("mountd: fix mount issue due to comparison with uninitialized uuid") was applied back in 2015. The final case of the switch statement no longer ends with a 'return true' and the final 'return false' is relevant now.

---
 utils/mountd/cache.c |    1 -
 1 file changed, 1 deletion(-)
utils/mountd/cache.c +0 -1
index e5186c7..8f54e37 100644
@@ -672,7 +672,6 @@ static bool match_fsid(struct parsed_fsid *parsed, nfs_export *exp, char *path)
 				if (memcmp(u, parsed->fhuuid, parsed->uuidlen) == 0)
 					return true;
 	}
-	/* Well, unreachable, actually: */
 	return false;
 }
 
#1 lore raw
Quoted 6 lines · Christian Bartolomäus

It became wrong when commit 78240c41be17bd20d5fb5b70b6f470d8e779adee ("mountd: fix mount issue due to comparison with uninitialized uuid") was applied back in 2015. The final case of the switch statement no longer ends with a 'return true' and the final 'return false' is relevant now.

Committed... (tag: nfs-utils-2-4-3-rc5)

steved.

Quoted 16 lines
---
 utils/mountd/cache.c |    1 -
 1 file changed, 1 deletion(-)
utils/mountd/cache.c +0 -1
index e5186c7..8f54e37 100644
@@ -672,7 +672,6 @@ static bool match_fsid(struct parsed_fsid *parsed, nfs_export *exp, char *path)
 				if (memcmp(u, parsed->fhuuid, parsed->uuidlen) == 0)
 					return true;
 	}
-	/* Well, unreachable, actually: */
 	return false;
 }