From fc32f8232cea75a731cb5adcf6340b79f5427d1c Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 30 Oct 2025 13:28:09 +0100 Subject: Use plist_write_to_stream to print app list --- src/ideviceinstaller.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c index c50bacf..d07cedf 100644 --- a/src/ideviceinstaller.c +++ b/src/ideviceinstaller.c @@ -170,27 +170,7 @@ static void print_apps(plist_t apps) if (!strcmp(key, "CFBundleIdentifier")) { printf("%s", plist_get_string_ptr(node, NULL)); } else { - uint64_t uval = 0; - switch (plist_get_node_type(node)) { - case PLIST_STRING: - printf("\"%s\"", plist_get_string_ptr(node, NULL)); - break; - case PLIST_INT: - plist_get_uint_val(node, &uval); - printf("%" PRIu64, uval); - break; - case PLIST_BOOLEAN: - printf("%s", plist_bool_val_is_true(node) ? "true" : "false"); - break; - case PLIST_ARRAY: - printf("(array)"); - break; - case PLIST_DICT: - printf("(dict)"); - break; - default: - break; - } + plist_write_to_stream(node, stdout, PLIST_FORMAT_PRINT, PLIST_OPT_NO_NEWLINE); } } } -- cgit v1.1-32-gdbae