From 7121cbcffe887b1780ec0bcd2b67d9bb216763b9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 28 Nov 2018 12:32:14 +0100 Subject: [PATCH] mount: merge redundant call mount_needs_network() into mount_is_network() --- src/core/mount.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/core/mount.c b/src/core/mount.c index afdbaa1d9d..de5c83928f 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -68,22 +68,18 @@ static bool MOUNT_STATE_WITH_PROCESS(MountState state) { MOUNT_UNMOUNTING_SIGKILL); } -static bool mount_needs_network(const char *options, const char *fstype) { - if (fstab_test_option(options, "_netdev\0")) +static bool mount_is_network(const MountParameters *p) { + assert(p); + + if (fstab_test_option(p->options, "_netdev\0")) return true; - if (fstype && fstype_is_network(fstype)) + if (p->fstype && fstype_is_network(p->fstype)) return true; return false; } -static bool mount_is_network(const MountParameters *p) { - assert(p); - - return mount_needs_network(p->options, p->fstype); -} - static bool mount_is_loop(const MountParameters *p) { assert(p); -- 2.25.1