summaryrefslogtreecommitdiffstats
path: root/misc-utils
diff options
context:
space:
mode:
authorKarel Zak2012-12-12 12:09:44 +0100
committerKarel Zak2012-12-12 12:09:44 +0100
commitb5fd07bcdbed72aeef5c7f2dba442ec8514cfd5a (patch)
tree5856dada78067e914d93635899208d9b867bd211 /misc-utils
parentfindmnt: don't care about xasprintf() return code (diff)
downloadkernel-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.c7
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);