Skip to contentSkip to conversation

mount: Fix return 0 from void function

PATCH In review Petr Vorel 2 participants 2 messages Nov 22, 2019

Subsystems (2)
lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH 1/1 mount: Fix return 0 from void function

Fixes d5e30346 ("mount: Do not overwrite /etc/mtab if it's symlink")

---
Hi Steve,

sorry for introducing a regression.

Kind regards,
Petr

 utils/mount/mount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
utils/mount/mount.c +1 -1
index 92a0dfe4..2be3dc2f 100644
@@ -208,7 +208,7 @@ create_mtab (void) {
 	   that would create a file /proc/mounts in case the proc filesystem
 	   is not mounted, and the fchmod below would also fail. */
 	if (mtab_is_a_symlink()) {
-		return EX_SUCCESS;
+		return;
 	}
 
 	lock_mtab();
Signature · 1 line
2.24.0
#1 lore raw
Quoted 7 lines · Petr Vorel
Fixes d5e30346 ("mount: Do not overwrite /etc/mtab if it's symlink")

---
Hi Steve,

sorry for introducing a regression.

No biggie... I should have caught it and I would think the compiler should say something... Throw a warning or something.

Committed (tag: nfs-utils-2-4-3-rc2)

steved.

Quoted 21 lines

Kind regards,
Petr

 utils/mount/mount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
utils/mount/mount.c +1 -1
index 92a0dfe4..2be3dc2f 100644
@@ -208,7 +208,7 @@ create_mtab (void) {
 	   that would create a file /proc/mounts in case the proc filesystem
 	   is not mounted, and the fchmod below would also fail. */
 	if (mtab_is_a_symlink()) {
-		return EX_SUCCESS;
+		return;
 	}
 
 	lock_mtab();