diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/conf.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -257,7 +257,7 @@ static int internal_set_value(const char *config_file, const char *key, plist_t | |||
257 | usbmuxd_log(LL_DEBUG, "Setting key %s in config file %s", key, config_file); | 257 | usbmuxd_log(LL_DEBUG, "Setting key %s in config file %s", key, config_file); |
258 | } | 258 | } |
259 | 259 | ||
260 | int res = plist_write_to_file(config, config_file, PLIST_FORMAT_XML, 0); | 260 | int res = (plist_write_to_file(config, config_file, PLIST_FORMAT_XML, 0) == PLIST_ERR_SUCCESS); |
261 | 261 | ||
262 | plist_free(config); | 262 | plist_free(config); |
263 | 263 | ||
@@ -277,7 +277,7 @@ static int config_set_value(const char *key, plist_t value) | |||
277 | 277 | ||
278 | int result = internal_set_value(config_file, key, value); | 278 | int result = internal_set_value(config_file, key, value); |
279 | if (!result) { | 279 | if (!result) { |
280 | usbmuxd_log(LL_ERROR, "ERROR: Failed to write to '%s': %s", config_file, strerror(errno)); | 280 | usbmuxd_log(LL_ERROR, "ERROR: Failed to write to '%s'", config_file); |
281 | } | 281 | } |
282 | 282 | ||
283 | free(config_file); | 283 | free(config_file); |
@@ -291,7 +291,7 @@ static int internal_get_value(const char* config_file, const char *key, plist_t | |||
291 | 291 | ||
292 | /* now parse file to get the SystemBUID */ | 292 | /* now parse file to get the SystemBUID */ |
293 | plist_t config = NULL; | 293 | plist_t config = NULL; |
294 | if (plist_read_from_file(config_file, &config, NULL)) { | 294 | if (plist_read_from_file(config_file, &config, NULL) == PLIST_ERR_SUCCESS) { |
295 | usbmuxd_log(LL_DEBUG, "Reading key %s from config file %s", key, config_file); | 295 | usbmuxd_log(LL_DEBUG, "Reading key %s from config file %s", key, config_file); |
296 | plist_t n = plist_dict_get_item(config, key); | 296 | plist_t n = plist_dict_get_item(config, key); |
297 | if (n) { | 297 | if (n) { |