summaryrefslogtreecommitdiff
path: root/usr.bin/cdio
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-08-20 22:32:43 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-08-20 22:32:43 +0000
commit6e5d9523d6273368df6377a4db98a9533d11505c (patch)
tree665d65c04b5874cca0392587a8c45d740f3af051 /usr.bin/cdio
parent856a95e3f951c7875c113b683b773a7bccf1e685 (diff)
Do not cast result of malloc/calloc/realloc* if stdlib.h is in scope
ok krw millert
Diffstat (limited to 'usr.bin/cdio')
-rw-r--r--usr.bin/cdio/rip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/cdio/rip.c b/usr.bin/cdio/rip.c
index 890066280fb..64c8d1e6656 100644
--- a/usr.bin/cdio/rip.c
+++ b/usr.bin/cdio/rip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rip.c,v 1.15 2014/09/13 16:06:37 doug Exp $ */
+/* $OpenBSD: rip.c,v 1.16 2015/08/20 22:32:41 deraadt Exp $ */
/*
* Copyright (c) 2007 Alexey Vatchenko <av@bsdua.org>
@@ -220,7 +220,7 @@ _add_pair(struct track_pair_head *head, int val1, int val2, int issorted)
}
}
- tp = (struct track_pair *)malloc(sizeof(*tp));
+ tp = malloc(sizeof(*tp));
if (tp == NULL)
return (-1);
@@ -369,7 +369,7 @@ read_track(struct track *ti)
n_sec = ti->end_lba - ti->start_lba;
blksize = (ti->isaudio) ? 2352 : 2048;
- sec = (u_char *)malloc(blksize);
+ sec = malloc(blksize);
if (sec == NULL)
return (-1);