]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
taskset: use xalloc lib
authorDavidlohr Bueso <dave@gnu.org>
Mon, 9 May 2011 15:18:32 +0000 (11:18 -0400)
committerKarel Zak <kzak@redhat.com>
Wed, 11 May 2011 08:06:58 +0000 (10:06 +0200)
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
schedutils/taskset.c

index a861a9099a7e89a77c7c358b7b41f516e0f95622..f34bc9331f06ce632ce3bbf2f175deb14c3c723f 100644 (file)
@@ -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