]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
namei: don't care about xasprintf() return code
authorKarel Zak <kzak@redhat.com>
Wed, 12 Dec 2012 11:12:25 +0000 (12:12 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 12 Dec 2012 11:12:25 +0000 (12:12 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/namei.c

index e067bea0e58e0c0d13ed8b005e4e566a81751c82..97c5d43d26f470f15c42cbacf4e465728c404de7 100644 (file)
@@ -123,8 +123,8 @@ add_id(struct idcache **ic, char *name, unsigned long int id, int *width)
        /* note, we ignore names with non-printable widechars */
        if (w > 0)
                nc->name = xstrdup(name);
-       else if (xasprintf(&nc->name, "%lu", id) == -1)
-               nc->name = NULL;
+       else
+               xasprintf(&nc->name, "%lu", id);
 
        for (x = *ic; x && x->next; x = x->next);