diff options
author | Karel Zak | 2012-12-12 12:09:44 +0100 |
---|---|---|
committer | Karel Zak | 2012-12-12 12:09:44 +0100 |
commit | b5fd07bcdbed72aeef5c7f2dba442ec8514cfd5a (patch) | |
tree | 5856dada78067e914d93635899208d9b867bd211 /misc-utils | |
parent | findmnt: don't care about xasprintf() return code (diff) | |
download | kernel-qcow2-util-linux-b5fd07bcdbed72aeef5c7f2dba442ec8514cfd5a.tar.gz kernel-qcow2-util-linux-b5fd07bcdbed72aeef5c7f2dba442ec8514cfd5a.tar.xz kernel-qcow2-util-linux-b5fd07bcdbed72aeef5c7f2dba442ec8514cfd5a.zip |
lsblk: don't care about xasprintf() return code
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils')
-rw-r--r-- | misc-utils/lsblk.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c index 97a0ce7c0..5a63b6b81 100644 --- a/misc-utils/lsblk.c +++ b/misc-utils/lsblk.c @@ -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); |