[PATCH 2/3] lscpu: use xstrdup from xalloc.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Petr Uzel <petr.uzel@xxxxxxx>
---
 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 0efc521..66c527d 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)
 {
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux