summaryrefslogtreecommitdiff
path: root/sbin/pdisk/hfs_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/pdisk/hfs_misc.c')
-rw-r--r--sbin/pdisk/hfs_misc.c6
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;
}