summaryrefslogtreecommitdiffstats
path: root/init/property_service.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-02-04 14:46:36 -0800
committerElliott Hughes <enh@google.com>2015-02-04 17:16:11 -0800
commitc0e919c92062360a69b771722677d041c9998403 (patch)
tree8d082ff796a482fd305a00640a5c83dd0a258d12 /init/property_service.cpp
parent27d28d3baff860d1fd936a5fcf2d920577c52575 (diff)
downloadsystem_core-c0e919c92062360a69b771722677d041c9998403.zip
system_core-c0e919c92062360a69b771722677d041c9998403.tar.gz
system_core-c0e919c92062360a69b771722677d041c9998403.tar.bz2
Stop using #if for conditional compilation.
Use regular 'if' to prevent bitrot. Also remove remaining typedefs. Change-Id: I2e6ca928e2db29b88b643cf990ff05cfb0be94a6
Diffstat (limited to 'init/property_service.cpp')
-rw-r--r--init/property_service.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/init/property_service.cpp b/init/property_service.cpp
index 4f0a46c..cc1ee34 100644
--- a/init/property_service.cpp
+++ b/init/property_service.cpp
@@ -56,10 +56,10 @@ static int property_area_inited = 0;
static int property_set_fd = -1;
-typedef struct {
+struct workspace {
size_t size;
int fd;
-} workspace;
+};
static int init_workspace(workspace *w, size_t size)
{
@@ -503,15 +503,13 @@ int properties_inited(void)
}
static void load_override_properties() {
-#ifdef ALLOW_LOCAL_PROP_OVERRIDE
- char debuggable[PROP_VALUE_MAX];
- int ret;
-
- ret = property_get("ro.debuggable", debuggable);
- if (ret && (strcmp(debuggable, "1") == 0)) {
- load_properties_from_file(PROP_PATH_LOCAL_OVERRIDE, NULL);
+ if (ALLOW_LOCAL_PROP_OVERRIDE) {
+ char debuggable[PROP_VALUE_MAX];
+ int ret = property_get("ro.debuggable", debuggable);
+ if (ret && (strcmp(debuggable, "1") == 0)) {
+ load_properties_from_file(PROP_PATH_LOCAL_OVERRIDE, NULL);
+ }
}
-#endif /* ALLOW_LOCAL_PROP_OVERRIDE */
}