ui/ncurses/boot-editor: Fix (null) when non-device resources are shown
authorJeremy Kerr <jk@ozlabs.org>
Tue, 3 Dec 2013 11:28:10 +0000 (19:28 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Tue, 3 Dec 2013 11:28:10 +0000 (19:28 +0800)
We're seeing the following in the boot editor:

 image:  (null)ftp://...

the (null) is due to the sep in conditional_prefix, which should be
blank, not NULL.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses/nc-boot-editor.c

index 86fba4d8d2da3ef62957e15fc8c017e5d4f1fa45..57cc0dc1cfac4eb6bfd3761123f4962f3f8a5238 100644 (file)
@@ -136,7 +136,7 @@ static char *conditional_prefix(struct pb_boot_data *ctx,
        if (!value || !*value)
                return NULL;
 
        if (!value || !*value)
                return NULL;
 
-       sep = NULL;
+       sep = "";
        if (!prefix)
                prefix = "";
        else if (prefix[strlen(prefix)] != '/')
        if (!prefix)
                prefix = "";
        else if (prefix[strlen(prefix)] != '/')