diff options
Diffstat (limited to '')
-rw-r--r-- | roots.cpp (renamed from roots.c) | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -33,7 +33,7 @@ static Volume* device_volumes = NULL; static int parse_options(char* options, Volume* volume) { char* option; - while (option = strtok(options, ",")) { + while ((option = strtok(options, ","))) { options = NULL; if (strncmp(option, "length=", 7) == 0) { @@ -48,7 +48,7 @@ static int parse_options(char* options, Volume* volume) { void load_volume_table() { int alloc = 2; - device_volumes = malloc(alloc * sizeof(Volume)); + device_volumes = (Volume*)malloc(alloc * sizeof(Volume)); // Insert an entry for /tmp, which is the ramdisk and is always mounted. device_volumes[0].mount_point = "/tmp"; @@ -91,7 +91,7 @@ void load_volume_table() { if (mount_point && fs_type && device) { while (num_volumes >= alloc) { alloc *= 2; - device_volumes = realloc(device_volumes, alloc*sizeof(Volume)); + device_volumes = (Volume*)realloc(device_volumes, alloc*sizeof(Volume)); } device_volumes[num_volumes].mount_point = strdup(mount_point); device_volumes[num_volumes].fs_type = strdup(fs_type); |