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

index 97a0ce7c0f5006d2788f934ce0e2493aa46ba13a..5a63b6b81448b66b1e6e05ed5198da206399caa5 100644 (file)
@@ -787,10 +787,9 @@ static void set_tt_data(struct blkdev_cxt *cxt, int col, int id, struct tt_line
                break;
        case COL_SIZE:
                if (cxt->size) {
-                       if (lsblk->bytes) {
-                               if (xasprintf(&p, "%jd", cxt->size) < 0)
-                                       p = NULL;
-                       } else
+                       if (lsblk->bytes)
+                               xasprintf(&p, "%jd", cxt->size);
+                       else
                                p = size_to_human_string(SIZE_SUFFIX_1LETTER, cxt->size);
                        if (p)
                                tt_line_set_data(ln, col, p);