From: Sung-hun Kim Date: Tue, 22 Feb 2022 08:53:10 +0000 (+0900) Subject: lib: tmonitor: fix build warnings X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dbb2f6f59ae1fda7029dbb7f529fe2a7c21a6192;p=platform%2Fcore%2Fsystem%2Fpass.git lib: tmonitor: fix build warnings Change-Id: I9be44c2f8304a40d61ca73dfc5dcace7c4a93770 Signed-off-by: Sung-hun Kim --- diff --git a/lib/tmonitor/tmonitor.c b/lib/tmonitor/tmonitor.c index ec0b933..40b1c9d 100644 --- a/lib/tmonitor/tmonitor.c +++ b/lib/tmonitor/tmonitor.c @@ -44,7 +44,7 @@ extern char *program_invocation_name; #endif enum attr_data_type { - ATTR_TYPE_UNKNOWN = 0, + ATTR_TYPE_UNKNOWN = 0, ATTR_TYPE_INT, ATTR_TYPE_DOUBLE, ATTR_TYPE_STRING, @@ -349,7 +349,7 @@ static int allocate_resource(struct tmonitor_resource *resource) { int idx, attr_idx = 0; int nr_attrs; - + nr_attrs = count_bits(resource->attr_mask); _I("nr_attrs: %d", nr_attrs); resource->nr_attrs = nr_attrs; @@ -568,7 +568,7 @@ int tmonitor_update(int id, int resource_type) buffer_len = recv(client->socket_fd, buffer, 100, 0); if (buffer_len <= 0) { _E("[libpass] socket disconnected"); - return; + return -EIO; } buffer[buffer_len] = '\0'; @@ -616,7 +616,7 @@ int tmonitor_get_value_int(int id, int resource_type, u_int64_t attr) buffer_len = recv(client->socket_fd, buffer, 100, 0); if (buffer_len <= 0) { _E("[libpass] socket disconnected"); - return; + return -EIO; } buffer[buffer_len] = '\0';