summaryrefslogtreecommitdiffstats
path: root/roots.c
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2011-10-28 19:33:05 +0200
committerDoug Zongker <dougz@android.com>2011-10-28 19:33:05 +0200
commit10e418d3c89ec404fbf959c1ef77a720a42a66ed (patch)
tree0c429bcc8f4a1935f3be97d87ebdc2f4434ee887 /roots.c
parentallow recovery packages to wipe cache (diff)
downloadandroid_bootable_recovery-10e418d3c89ec404fbf959c1ef77a720a42a66ed.tar
android_bootable_recovery-10e418d3c89ec404fbf959c1ef77a720a42a66ed.tar.gz
android_bootable_recovery-10e418d3c89ec404fbf959c1ef77a720a42a66ed.tar.bz2
android_bootable_recovery-10e418d3c89ec404fbf959c1ef77a720a42a66ed.tar.lz
android_bootable_recovery-10e418d3c89ec404fbf959c1ef77a720a42a66ed.tar.xz
android_bootable_recovery-10e418d3c89ec404fbf959c1ef77a720a42a66ed.tar.zst
android_bootable_recovery-10e418d3c89ec404fbf959c1ef77a720a42a66ed.zip
Diffstat (limited to '')
-rw-r--r--roots.cpp (renamed from roots.c)6
1 files changed, 3 insertions, 3 deletions
diff --git a/roots.c b/roots.cpp
index cb7e067a1..9345cb0a2 100644
--- a/roots.c
+++ b/roots.cpp
@@ -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);