summaryrefslogtreecommitdiffstats
path: root/sys-utils/lscpu.c
diff options
context:
space:
mode:
authorSami Kerola2012-02-29 15:54:24 +0100
committerSami Kerola2012-03-18 14:28:05 +0100
commit6f312c89578be7b8d0a47c75a4de4cc8c190e40e (patch)
treecde8876c4831c709bc210455bccd0b70aa2e1b52 /sys-utils/lscpu.c
parentinclude: add asprintf wrapper (diff)
downloadkernel-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 'sys-utils/lscpu.c')
-rw-r--r--sys-utils/lscpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index 3cdd76704..6e17b2eb5 100644
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -543,7 +543,7 @@ read_hypervisor(struct lscpu_desc *desc)
str = strchr(buf, ':');
if (!str)
continue;
- if (asprintf(&str, "%s", str + 1) == -1)
+ if (xasprintf(&str, "%s", str + 1) == -1)
errx(EXIT_FAILURE, _("failed to allocate memory"));
/* remove leading, trailing and repeating whitespace */
while (*str == ' ')