]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lscpu: use xstrdup from xalloc.h
authorPetr Uzel <petr.uzel@suse.cz>
Thu, 17 Feb 2011 12:09:06 +0000 (13:09 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 21 Feb 2011 13:41:36 +0000 (14:41 +0100)
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
sys-utils/lscpu.c

index 0efc5217c62ce338b3d25663d4cb4a75835604a8..66c527dff3a0863847ff493421fdeb743b382c6e 100644 (file)
@@ -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)
 {