diff options
author | Benoit Goby <benoit@android.com> | 2013-09-24 16:18:09 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-09-24 16:18:09 -0700 |
commit | adb88e20e4b71cfd1b73bd9efbf7693a28025af3 (patch) | |
tree | 0547d696342a034193b2efbf5aff4de04149a972 /init | |
parent | 90f143328f8f050b6648c7342dc7a6721725e32f (diff) | |
parent | 4820022b5edb0d19e268d836c25aa628b4378aba (diff) | |
download | system_core-adb88e20e4b71cfd1b73bd9efbf7693a28025af3.zip system_core-adb88e20e4b71cfd1b73bd9efbf7693a28025af3.tar.gz system_core-adb88e20e4b71cfd1b73bd9efbf7693a28025af3.tar.bz2 |
am 4820022b: am 0b7d588d: am f2c4c4ad: Merge "init: Fix queue_all_property_triggers with nonexistent properties"
* commit '4820022b5edb0d19e268d836c25aa628b4378aba':
init: Fix queue_all_property_triggers with nonexistent properties
Diffstat (limited to 'init')
-rw-r--r-- | init/init_parser.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/init/init_parser.c b/init/init_parser.c index 7c2fa8c..667c7ab 100644 --- a/init/init_parser.c +++ b/init/init_parser.c @@ -552,12 +552,14 @@ void queue_all_property_triggers() if (length > PROP_NAME_MAX) { ERROR("property name too long in trigger %s", act->name); } else { + int ret; memcpy(prop_name, name, length); prop_name[length] = 0; /* does the property exist, and match the trigger value? */ - property_get(prop_name, value); - if (!strcmp(equals + 1, value) ||!strcmp(equals + 1, "*")) { + ret = property_get(prop_name, value); + if (ret > 0 && (!strcmp(equals + 1, value) || + !strcmp(equals + 1, "*"))) { action_add_queue_tail(act); } } |