]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
uuidparse: use libuuid function to test nil uuid
authorSami Kerola <kerolasa@iki.fi>
Sun, 22 Nov 2020 20:46:40 +0000 (20:46 +0000)
committerSami Kerola <kerolasa@iki.fi>
Mon, 28 Dec 2020 09:53:08 +0000 (09:53 +0000)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
misc-utils/uuidparse.c

index eae0b71a15cad495881ee4db62899b2e4b8dacc1..f069803e8753cd57adb1afa8bec7c28b8d833eca 100644 (file)
@@ -193,7 +193,7 @@ static void fill_table_row(struct libscols_table *tb, char const *const uuid)
                        }
                        switch (type) {
                        case 0:
-                               if (strspn(uuid, "0-") == 36)
+                               if (uuid_is_null(buf))
                                        str = xstrdup(_("nil"));
                                else
                                        str = xstrdup(_("unknown"));