diff options
author | Davidlohr Bueso | 2011-05-09 17:18:32 +0200 |
---|---|---|
committer | Karel Zak | 2011-05-11 10:06:58 +0200 |
commit | dd29a762939f95c43e3afe5e9f32be1add6ac315 (patch) | |
tree | c6f9747d28cbf748811170f43b1766337cc697e5 /schedutils | |
parent | fdisk: accept digits-space-suffix format (diff) | |
download | kernel-qcow2-util-linux-dd29a762939f95c43e3afe5e9f32be1add6ac315.tar.gz kernel-qcow2-util-linux-dd29a762939f95c43e3afe5e9f32be1add6ac315.tar.xz kernel-qcow2-util-linux-dd29a762939f95c43e3afe5e9f32be1add6ac315.zip |
taskset: use xalloc lib
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Diffstat (limited to 'schedutils')
-rw-r--r-- | schedutils/taskset.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/schedutils/taskset.c b/schedutils/taskset.c index a861a9099..f34bc9331 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 |