summaryrefslogtreecommitdiffstats
path: root/roots.cpp
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2011-10-28 19:33:05 +0200
committerDoug Zongker <dougz@android.com>2011-10-31 18:24:09 +0100
commit28ce47cfa6919518a8c298088bf08b03bb374c0f (patch)
tree0c429bcc8f4a1935f3be97d87ebdc2f4434ee887 /roots.cpp
parentallow recovery packages to wipe cache (diff)
downloadandroid_bootable_recovery-28ce47cfa6919518a8c298088bf08b03bb374c0f.tar
android_bootable_recovery-28ce47cfa6919518a8c298088bf08b03bb374c0f.tar.gz
android_bootable_recovery-28ce47cfa6919518a8c298088bf08b03bb374c0f.tar.bz2
android_bootable_recovery-28ce47cfa6919518a8c298088bf08b03bb374c0f.tar.lz
android_bootable_recovery-28ce47cfa6919518a8c298088bf08b03bb374c0f.tar.xz
android_bootable_recovery-28ce47cfa6919518a8c298088bf08b03bb374c0f.tar.zst
android_bootable_recovery-28ce47cfa6919518a8c298088bf08b03bb374c0f.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);