Merge "Make vdc a C++ file as a base for further improvement."
diff --git a/Android.mk b/Android.mk
index d4a178a..4052b7d 100644
--- a/Android.mk
+++ b/Android.mk
@@ -98,7 +98,7 @@
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_CLANG := true
-LOCAL_SRC_FILES:= vdc.c
+LOCAL_SRC_FILES:= vdc.cpp
LOCAL_MODULE:= vdc
LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_CFLAGS := $(vold_cflags)
diff --git a/vdc.c b/vdc.cpp
similarity index 98%
rename from vdc.c
rename to vdc.cpp
index 6927e92..3e80940 100644
--- a/vdc.c
+++ b/vdc.cpp
@@ -100,7 +100,7 @@
}
static int do_monitor(int sock, int stop_after_cmd) {
- char *buffer = malloc(4096);
+ char *buffer = (char *) malloc(4096);
if (!stop_after_cmd)
printf("[Connected to Vold]\n");