From 6f312c89578be7b8d0a47c75a4de4cc8c190e40e Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Wed, 29 Feb 2012 15:54:24 +0100 Subject: xalloc: use xasprintf in all files Signed-off-by: Sami Kerola --- sys-utils/lscpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys-utils/lscpu.c') 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 == ' ') -- cgit v1.2.3-55-g7522