From: Seonah Moon Date: Thu, 17 Jan 2019 04:10:47 +0000 (+0900) Subject: [WGID-373875] fix svace issue(UNCHECKED_FUNC_RES) X-Git-Tag: submit/tizen/20190117.231022^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F93%2F197893%2F2;p=platform%2Fcore%2Fapi%2Fhttp.git [WGID-373875] fix svace issue(UNCHECKED_FUNC_RES) Change-Id: I3bab8e459c8c3ddb6dac5128ddb077ca136b661d --- diff --git a/packaging/capi-network-http.spec b/packaging/capi-network-http.spec index 38cf333..da2530b 100644 --- a/packaging/capi-network-http.spec +++ b/packaging/capi-network-http.spec @@ -1,6 +1,6 @@ Name: capi-network-http Summary: Http Framework -Version: 0.0.36 +Version: 0.0.37 Release: 0 Group: System/Network License: Apache-2.0 diff --git a/src/http_common.c b/src/http_common.c index 34ace4d..66828ca 100644 --- a/src/http_common.c +++ b/src/http_common.c @@ -48,7 +48,6 @@ bool _http_is_init(void) bool _http_check_permission(http_privilege_e _privilege) { FILE *fd; - int ret; char smack_label[SMACK_LABEL_LEN + 1] = {0, }; char uid[10]; @@ -70,10 +69,10 @@ bool _http_check_permission(http_privilege_e _privilege) ERR("Failed to open /proc/self/attr/current\n"); return false; } - ret = fread(smack_label, SMACK_LABEL_LEN, 1, fd); - if (ferror(fd)) { - ERR("Failed to read /proc/self/attr/current\n"); + ret = fread(smack_label, SMACK_LABEL_LEN, 1, fd); + if (ret < 0) { + ERR("Failed[%d] to read /proc/self/attr/current\n", ferror(fd)); fclose(fd); return false; }