summaryrefslogtreecommitdiffstats
path: root/sys-utils/lscpu.c
diff options
context:
space:
mode:
authorKarel Zak2012-12-12 12:13:38 +0100
committerKarel Zak2012-12-12 12:13:38 +0100
commit9d8537ff21e09d6dc01834795406fcbe93e0e995 (patch)
tree6e0255db83cdcce8883ab8f11e5d032a6fdafe7c /sys-utils/lscpu.c
parentnamei: don't care about xasprintf() return code (diff)
downloadkernel-qcow2-util-linux-9d8537ff21e09d6dc01834795406fcbe93e0e995.tar.gz
kernel-qcow2-util-linux-9d8537ff21e09d6dc01834795406fcbe93e0e995.tar.xz
kernel-qcow2-util-linux-9d8537ff21e09d6dc01834795406fcbe93e0e995.zip
lscpu: don't care about xasprintf() return code
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/lscpu.c')
-rw-r--r--sys-utils/lscpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index 5ff5aa79d..7cdc9f927 100644
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -565,8 +565,8 @@ read_hypervisor(struct lscpu_desc *desc)
str = strchr(buf, ':');
if (!str)
continue;
- if (xasprintf(&str, "%s", str + 1) == -1)
- errx(EXIT_FAILURE, _("failed to allocate memory"));
+ xasprintf(&str, "%s", str + 1);
+
/* remove leading, trailing and repeating whitespace */
while (*str == ' ')
str++;