From b67f76a44cc5726e0378eb55f8937ede73cf201a Mon Sep 17 00:00:00 2001 From: Alexander Aksenov Date: Wed, 13 Sep 2017 21:20:30 +0300 Subject: [PATCH] Fix incorrect error message Change-Id: Id67cb9a9692c977a8fdee23d972aa7a3709ade5a Signed-off-by: Alexander Aksenov --- helper/dahelper.c | 2 +- helper/got_patching.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helper/dahelper.c b/helper/dahelper.c index 84e264d..3373beb 100755 --- a/helper/dahelper.c +++ b/helper/dahelper.c @@ -187,7 +187,7 @@ int add_binary(char *path) if (!SLIST_EMPTY(&gTraceInfo.bins_info.bins_list) && (_find_binary_no_lock(real_path) != NULL)) { - ret = -EALREADY; + ret = EALREADY; goto free_real_path; } diff --git a/helper/got_patching.c b/helper/got_patching.c index 1d87529..4fba87a 100644 --- a/helper/got_patching.c +++ b/helper/got_patching.c @@ -125,7 +125,7 @@ static void _process_target_bins(char *bins_data, size_t avail_size) /* TODO Think about removing binaries */ ret = add_binary(path); - if (ret != 0) + if (ret < 0) PRINTERR("Adding failed, error code %d", ret); /* add_binary() allocates new buffer with realpath(), so this * path should be freed */ -- 2.7.4