[PATCH 1/2] taskset: use xalloc lib

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

 



From: Davidlohr Bueso <dave@xxxxxxx>
Date: Mon, 9 May 2011 11:18:32 -0400

Signed-off-by: Davidlohr Bueso <dave@xxxxxxx>
---
 schedutils/taskset.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/schedutils/taskset.c b/schedutils/taskset.c
index a861a90..f34bc93 100644
--- a/schedutils/taskset.c
+++ b/schedutils/taskset.c
@@ -28,6 +28,7 @@
 #include "cpuset.h"
 #include "nls.h"
 #include "strutils.h"
+#include "xalloc.h"
 #include "c.h"
 
 static void __attribute__((__noreturn__)) usage(FILE *out)
@@ -120,9 +121,7 @@ int main(int argc, char *argv[])
 		err(EXIT_FAILURE, _("cpuset_alloc failed"));
 
 	buflen = 7 * cur_nbits;
-	buf = malloc(buflen);
-	if (!buf)
-		err(EXIT_FAILURE, _("malloc failed"));
+	buf = xmalloc(buflen);
 
 	/*
 	 * new_set is always used for the sched_setaffinity call
-- 
1.7.4.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