From 2a7727dec265fa96e8522b0a557b72320d2889a7 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Sun, 3 May 2015 15:31:41 -0500 Subject: Fix getprop sorting and error reporting. Use qstrcmp instead of alphasort (which expects struct dirent arguments). Don't use perror_exit because property_list doesn't set errno. --- toys/android/getprop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toys/android') diff --git a/toys/android/getprop.c b/toys/android/getprop.c index 400d80e7..09bb0f0b 100644 --- a/toys/android/getprop.c +++ b/toys/android/getprop.c @@ -40,8 +40,8 @@ void getprop_main(void) } else { size_t i; - if (property_list((void *)add_property, 0)) perror_exit("property_list"); - qsort(TT.nv, TT.size, 2*sizeof(char *), alphasort); + if (property_list((void *)add_property, 0)) error_exit("property_list"); + qsort(TT.nv, TT.size, 2*sizeof(char *), qstrcmp); for (i = 0; i