diff options
| author | 2014-10-05 16:51:03 +0200 | |
|---|---|---|
| committer | 2014-10-05 16:51:03 +0200 | |
| commit | 5072dea1373b7c4789a9ea1e65d05ea30acf41ed (patch) | |
| tree | 51bdd0584d727080fab86acd28bd4b360b2333bd /src/restore.c | |
| parent | 5552fa0fcc7501d3206fb3d3a64c1d04062ec53b (diff) | |
| download | libimobiledevice-5072dea1373b7c4789a9ea1e65d05ea30acf41ed.tar.gz libimobiledevice-5072dea1373b7c4789a9ea1e65d05ea30acf41ed.tar.bz2 | |
Convert int16_t macro error types into enum to improve debugging/type-checking
This simple change provides various benefits for developers like compile
time errors, better auto-completition in editors and the ability of a
debugger to show the constant instead of just the raw value.
Thanks to Aaron Burghardt for the proposal.
Diffstat (limited to 'src/restore.c')
| -rw-r--r-- | src/restore.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/restore.c b/src/restore.c index 3f6be8f..4d4823f 100644 --- a/src/restore.c +++ b/src/restore.c | |||
| @@ -154,7 +154,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_send(restored_client_t client, pl | |||
| 154 | return RESTORE_E_INVALID_ARG; | 154 | return RESTORE_E_INVALID_ARG; |
| 155 | 155 | ||
| 156 | restored_error_t ret = RESTORE_E_SUCCESS; | 156 | restored_error_t ret = RESTORE_E_SUCCESS; |
| 157 | idevice_error_t err; | 157 | property_list_service_error_t err; |
| 158 | 158 | ||
| 159 | err = property_list_service_send_xml_plist(client->parent, plist); | 159 | err = property_list_service_send_xml_plist(client->parent, plist); |
| 160 | if (err != PROPERTY_LIST_SERVICE_E_SUCCESS) { | 160 | if (err != PROPERTY_LIST_SERVICE_E_SUCCESS) { |
| @@ -297,6 +297,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_client_new(idevice_t device, rest | |||
| 297 | return RESTORE_E_INVALID_ARG; | 297 | return RESTORE_E_INVALID_ARG; |
| 298 | 298 | ||
| 299 | restored_error_t ret = RESTORE_E_SUCCESS; | 299 | restored_error_t ret = RESTORE_E_SUCCESS; |
| 300 | idevice_error_t idev_ret; | ||
| 300 | 301 | ||
| 301 | static struct lockdownd_service_descriptor service = { | 302 | static struct lockdownd_service_descriptor service = { |
| 302 | .port = 0xf27e, | 303 | .port = 0xf27e, |
| @@ -317,9 +318,10 @@ LIBIMOBILEDEVICE_API restored_error_t restored_client_new(idevice_t device, rest | |||
| 317 | if (label != NULL) | 318 | if (label != NULL) |
| 318 | client_loc->label = strdup(label); | 319 | client_loc->label = strdup(label); |
| 319 | 320 | ||
| 320 | ret = idevice_get_udid(device, &client_loc->udid); | 321 | idev_ret = idevice_get_udid(device, &client_loc->udid); |
| 321 | if (RESTORE_E_SUCCESS != ret) { | 322 | if (IDEVICE_E_SUCCESS != idev_ret) { |
| 322 | debug_info("failed to get device udid."); | 323 | debug_info("failed to get device udid."); |
| 324 | ret = RESTORE_E_DEVICE_ERROR; | ||
| 323 | } | 325 | } |
| 324 | debug_info("device udid: %s", client_loc->udid); | 326 | debug_info("device udid: %s", client_loc->udid); |
| 325 | 327 | ||
