From: Petr Uzel Date: Thu, 17 Feb 2011 12:09:06 +0000 (+0100) Subject: lscpu: use xstrdup from xalloc.h X-Git-Tag: v2.20-rc1~539 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4581647a62690f7789ff6e30e8d8eefbb32a4015;p=thirdparty%2Futil-linux.git lscpu: use xstrdup from xalloc.h Signed-off-by: Petr Uzel --- 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) {