From: Davidlohr Bueso Date: Mon, 9 May 2011 15:18:32 +0000 (-0400) Subject: taskset: use xalloc lib X-Git-Tag: v2.20-rc1~280 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd29a762939f95c43e3afe5e9f32be1add6ac315;p=thirdparty%2Futil-linux.git taskset: use xalloc lib Signed-off-by: Davidlohr Bueso --- diff --git a/schedutils/taskset.c b/schedutils/taskset.c index a861a9099a..f34bc9331f 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