diff options
author | Petr Uzel | 2011-02-17 13:09:06 +0100 |
---|---|---|
committer | Karel Zak | 2011-02-21 14:41:36 +0100 |
commit | 4581647a62690f7789ff6e30e8d8eefbb32a4015 (patch) | |
tree | 5f5b8650bfb31384b71525c4a9cd0ceb2e2c37e4 /sys-utils/lscpu.c | |
parent | losetup: spelling fixes (diff) | |
download | kernel-qcow2-util-linux-4581647a62690f7789ff6e30e8d8eefbb32a4015.tar.gz kernel-qcow2-util-linux-4581647a62690f7789ff6e30e8d8eefbb32a4015.tar.xz kernel-qcow2-util-linux-4581647a62690f7789ff6e30e8d8eefbb32a4015.zip |
lscpu: use xstrdup from xalloc.h
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Diffstat (limited to 'sys-utils/lscpu.c')
-rw-r--r-- | sys-utils/lscpu.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c index 0efc5217c..66c527dff 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) { |