diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-08-20 22:32:43 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-08-20 22:32:43 +0000 |
commit | 6e5d9523d6273368df6377a4db98a9533d11505c (patch) | |
tree | 665d65c04b5874cca0392587a8c45d740f3af051 /usr.bin/at/at.c | |
parent | 856a95e3f951c7875c113b683b773a7bccf1e685 (diff) |
Do not cast result of malloc/calloc/realloc* if stdlib.h is in scope
ok krw millert
Diffstat (limited to 'usr.bin/at/at.c')
-rw-r--r-- | usr.bin/at/at.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/at/at.c b/usr.bin/at/at.c index 080d2e853dc..e9c8528415d 100644 --- a/usr.bin/at/at.c +++ b/usr.bin/at/at.c @@ -1,4 +1,4 @@ -/* $OpenBSD: at.c,v 1.64 2014/10/08 03:56:52 doug Exp $ */ +/* $OpenBSD: at.c,v 1.65 2015/08/20 22:32:41 deraadt Exp $ */ /* * at.c : Put file into atrun queue @@ -514,7 +514,7 @@ list_jobs(int argc, char **argv, int count_only, int csort) */ numjobs = 0; maxjobs = stbuf.st_nlink + 4; - atjobs = (struct atjob **)calloc(maxjobs, sizeof(struct atjob *)); + atjobs = calloc(maxjobs, sizeof(struct atjob *)); if (atjobs == NULL) panic("Insufficient virtual memory"); @@ -561,7 +561,7 @@ list_jobs(int argc, char **argv, int count_only, int csort) continue; } - job = (struct atjob *)malloc(sizeof(struct atjob)); + job = malloc(sizeof(struct atjob)); if (job == NULL) panic("Insufficient virtual memory"); job->runtimer = runtimer; |