diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-08-20 22:02:22 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-08-20 22:02:22 +0000 |
commit | 999d668af49ba65ca209316fb879a8459e9f850e (patch) | |
tree | c9473babdf7ff29e941f183a4a1929fba6c63699 /sbin/pdisk/hfs_misc.c | |
parent | 9e6263b04dc3a7a8ef2f02175efe20fe4ab2097a (diff) |
<stdlib.h> is included, so do not need to cast result from
malloc, calloc, realloc*
ok krw millert
Diffstat (limited to 'sbin/pdisk/hfs_misc.c')
-rw-r--r-- | sbin/pdisk/hfs_misc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/pdisk/hfs_misc.c b/sbin/pdisk/hfs_misc.c index 894b829dfb9..eac587deb43 100644 --- a/sbin/pdisk/hfs_misc.c +++ b/sbin/pdisk/hfs_misc.c @@ -171,7 +171,7 @@ get_HFS_name(partition_map *entry, int *kind) *kind = kHFS_not; - mdb = (struct mdb_record *) malloc(PBLOCK_SIZE); + mdb = malloc(PBLOCK_SIZE); if (mdb == NULL) { error(errno, "can't allocate memory for MDB"); return NULL; @@ -196,7 +196,7 @@ get_HFS_name(partition_map *entry, int *kind) // printf("%lu HFS\n", entry->disk_address); *kind = kHFS_std; len = mdb->drVN[0]; - name = (char *) malloc(len+1); + name = malloc(len+1); strncpy(name, &mdb->drVN[1], len); name[len] = 0; } else { @@ -204,7 +204,7 @@ get_HFS_name(partition_map *entry, int *kind) // printf("%lu embedded HFS Plus\n", entry->disk_address); *kind = kHFS_embed; len = mdb->drVN[0]; - name = (char *) malloc(len+1); + name = malloc(len+1); strncpy(name, &mdb->drVN[1], len); name[len] = 0; } |