From 4581647a62690f7789ff6e30e8d8eefbb32a4015 Mon Sep 17 00:00:00 2001 From: Petr Uzel Date: Thu, 17 Feb 2011 13:09:06 +0100 Subject: [PATCH] lscpu: use xstrdup from xalloc.h Signed-off-by: Petr Uzel --- sys-utils/lscpu.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c index 0efc5217c6..66c527dff3 100644 --- a/sys-utils/lscpu.c +++ b/sys-utils/lscpu.c @@ -36,6 +36,7 @@ #include "cpuset.h" #include "nls.h" +#include "xalloc.h" #include "c.h" #define CACHE_MAX 100 @@ -234,15 +235,6 @@ path_exist(const char *path, ...) return access(p, F_OK) == 0; } -static char * -xstrdup(const char *str) -{ - char *s = strdup(str); - if (!s) - err(EXIT_FAILURE, _("error: strdup failed")); - return s; -} - static cpu_set_t * path_cpuparse(int islist, const char *path, va_list ap) { -- 2.47.3