From 5072dea1373b7c4789a9ea1e65d05ea30acf41ed Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Sun, 5 Oct 2014 16:51:03 +0200 Subject: 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. --- src/service.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/service.c') diff --git a/src/service.c b/src/service.c index c4743dc..48959b6 100644 --- a/src/service.c +++ b/src/service.c @@ -76,7 +76,7 @@ LIBIMOBILEDEVICE_API service_error_t service_client_new(idevice_t device, lockdo return SERVICE_E_SUCCESS; } -LIBIMOBILEDEVICE_API service_error_t service_client_factory_start_service(idevice_t device, const char* service_name, void **client, const char* label, int16_t (*constructor_func)(idevice_t, lockdownd_service_descriptor_t, void**), int16_t *error_code) +LIBIMOBILEDEVICE_API service_error_t service_client_factory_start_service(idevice_t device, const char* service_name, void **client, const char* label, int32_t (*constructor_func)(idevice_t, lockdownd_service_descriptor_t, void**), int32_t *error_code) { *client = NULL; @@ -95,9 +95,9 @@ LIBIMOBILEDEVICE_API service_error_t service_client_factory_start_service(idevic return SERVICE_E_START_SERVICE_ERROR; } - int16_t ec; + int32_t ec; if (constructor_func) { - ec = (int16_t)constructor_func(device, service, client); + ec = (int32_t)constructor_func(device, service, client); } else { ec = service_client_new(device, service, (service_client_t*)client); } -- cgit v1.1-32-gdbae