summaryrefslogtreecommitdiff
path: root/util-linux/mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/mount.c')
-rw-r--r--util-linux/mount.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 52ced7a..23a3459 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -907,10 +907,12 @@ get_mountport(struct pmap *pm_mnt,
goto next;
if (version && version <= 2 && pmap->pml_map.pm_vers > 2)
goto next;
- if (pmap->pml_map.pm_vers > MAX_NFSPROT ||
- (proto && pm_mnt->pm_prot && pmap->pml_map.pm_prot != proto) ||
- (port && pmap->pml_map.pm_port != port))
+ if (pmap->pml_map.pm_vers > MAX_NFSPROT
+ || (proto && pm_mnt->pm_prot && pmap->pml_map.pm_prot != proto)
+ || (port && pmap->pml_map.pm_port != port)
+ ) {
goto next;
+ }
memcpy(pm_mnt, &pmap->pml_map, sizeof(*pm_mnt));
next:
pmap = pmap->pml_next;