From 19a28b0ed18c8ca2f855e7d129ddcdb8c939a707 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Fri, 24 Jul 2009 23:51:53 +0200 Subject: Use iphone_device_get_uuid() not lockdown, for less overhead where possible --- src/iphone.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/iphone.c') diff --git a/src/iphone.c b/src/iphone.c index 0e179e7..93d7b5d 100644 --- a/src/iphone.c +++ b/src/iphone.c @@ -104,13 +104,13 @@ uint32_t iphone_get_device_handle(iphone_device_t device) } } -char* iphone_get_uuid(iphone_device_t device) +iphone_error_t iphone_device_get_uuid(iphone_device_t device, char **uuid) { - if (device) { - return device->serial_number; - } else { - return NULL; - } + if (!device) + return IPHONE_E_INVALID_ARG; + + *uuid = strdup(device->serial_number); + return IPHONE_E_SUCCESS; } /** Cleans up an iPhone structure, then frees the structure itself. -- cgit v1.1-32-gdbae