OSDN Git Service

bionic: add __system_property_foreach
authorGreg Hackmann <ghackmann@google.com>
Wed, 13 Feb 2013 00:39:31 +0000 (16:39 -0800)
committerGreg Hackmann <ghackmann@google.com>
Tue, 18 Jun 2013 22:38:31 +0000 (15:38 -0700)
commit577418403d68e663fb33c7b0c8a90d862d9c00cf
tree2426b457f82259c0b4fda183557591b6e66e9b06
parent1791cb0001516d6f3ffa7b916d61942b98bc88f4
bionic: add __system_property_foreach

find_nth() will be inefficient on a trie.  Since find_nth() is only used
internally and only for enumerating properties, we can add a foreach()
function to do this directly.

Change-Id: I66bde9926c193073d74b244cce9fffd52108fff8
Signed-off-by: Greg Hackmann <ghackmann@google.com>
libc/bionic/system_properties.c
libc/include/sys/system_properties.h
tests/system_properties_test.cpp