diff options
author | Sami Kerola | 2012-02-29 15:54:24 +0100 |
---|---|---|
committer | Sami Kerola | 2012-03-18 14:28:05 +0100 |
commit | 6f312c89578be7b8d0a47c75a4de4cc8c190e40e (patch) | |
tree | cde8876c4831c709bc210455bccd0b70aa2e1b52 /partx/partx.c | |
parent | include: add asprintf wrapper (diff) | |
download | kernel-qcow2-util-linux-6f312c89578be7b8d0a47c75a4de4cc8c190e40e.tar.gz kernel-qcow2-util-linux-6f312c89578be7b8d0a47c75a4de4cc8c190e40e.tar.xz kernel-qcow2-util-linux-6f312c89578be7b8d0a47c75a4de4cc8c190e40e.zip |
xalloc: use xasprintf in all files
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'partx/partx.c')
-rw-r--r-- | partx/partx.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/partx/partx.c b/partx/partx.c index e5f4319c8..ddce6fe4e 100644 --- a/partx/partx.c +++ b/partx/partx.c @@ -445,25 +445,25 @@ static void add_tt_line(struct tt *tt, blkid_partition par) switch (get_column_id(i)) { case COL_PARTNO: - rc = asprintf(&str, "%d", + rc = xasprintf(&str, "%d", blkid_partition_get_partno(par)); break; case COL_START: - rc = asprintf(&str, "%ju", + rc = xasprintf(&str, "%ju", blkid_partition_get_start(par)); break; case COL_END: - rc = asprintf(&str, "%ju", + rc = xasprintf(&str, "%ju", blkid_partition_get_start(par) + blkid_partition_get_size(par) - 1); break; case COL_SECTORS: - rc = asprintf(&str, "%ju", + rc = xasprintf(&str, "%ju", blkid_partition_get_size(par)); break; case COL_SIZE: if (partx_flags & FL_BYTES) - rc = asprintf(&str, "%ju", (uintmax_t) + rc = xasprintf(&str, "%ju", (uintmax_t) blkid_partition_get_size(par) << 9); else str = size_to_human_string(SIZE_SUFFIX_1LETTER, @@ -484,11 +484,11 @@ static void add_tt_line(struct tt *tt, blkid_partition par) if (str) str = xstrdup(str); else - rc = asprintf(&str, "0x%x", + rc = xasprintf(&str, "0x%x", blkid_partition_get_type(par)); break; case COL_FLAGS: - rc = asprintf(&str, "0x%llx", blkid_partition_get_flags(par)); + rc = xasprintf(&str, "0x%llx", blkid_partition_get_flags(par)); break; case COL_SCHEME: { |