[systemd-commits] src/core

Daniel Mack zonque at kemper.freedesktop.org
Mon Jan 12 05:03:51 PST 2015


 src/core/mount.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0c47569ac9eb365ebeb9342f47fb98d52bcc4704
Author: Daniel Mack <daniel at zonque.org>
Date:   Mon Jan 12 13:46:39 2015 +0100

    core/mount: use isempty() to check for empty strings
    
    strempty() will return an empty string in case the input parameter is
    a NULL pointer. The correct test to check for an empty string is
    isempty(), so use that instead.
    
    This fixes a regression from commit 17a1c59 ("core/mount: filter out
    noauto,auto,nofail,fail options").

diff --git a/src/core/mount.c b/src/core/mount.c
index 9f7c4d2..5c87ed3 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -932,7 +932,7 @@ static void mount_enter_mounting(Mount *m) {
                         r = exec_command_append(m->control_command, "-s", NULL);
                 if (r >= 0 && m->parameters_fragment.fstype)
                         r = exec_command_append(m->control_command, "-t", m->parameters_fragment.fstype, NULL);
-                if (r >= 0 && !strempty(opts))
+                if (r >= 0 && !isempty(opts))
                         r = exec_command_append(m->control_command, "-o", opts, NULL);
         } else
                 r = -ENOENT;



More information about the systemd-commits mailing list