summaryrefslogtreecommitdiff
path: root/sys-utils/lscpu.c
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2012-12-12 12:13:38 +0100
committerKarel Zak <kzak@redhat.com>2012-12-12 12:13:38 +0100
commit9d8537ff21e09d6dc01834795406fcbe93e0e995 (patch)
tree6e0255db83cdcce8883ab8f11e5d032a6fdafe7c /sys-utils/lscpu.c
parent7a591a1fb5023d80f3e9bf51defd9c148c8db93d (diff)
downloadutil-linux-9d8537ff21e09d6dc01834795406fcbe93e0e995.tar.gz
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 5ff5aa79..7cdc9f92 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++;