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 | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/core/mount.c b/src/core/mount.c index afdbaa1d9d0..de5c83928f8 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -68,20 +68,16 @@ 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")) - return true; - - if (fstype && fstype_is_network(fstype)) - return true; - - return false; -} - static bool mount_is_network(const MountParameters *p) { assert(p); - return mount_needs_network(p->options, p->fstype); + if (fstab_test_option(p->options, "_netdev\0")) + return true; + + if (p->fstype && fstype_is_network(p->fstype)) + return true; + + return false; } static bool mount_is_loop(const MountParameters *p) {