summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2015-09-23 13:24:53 +0200
committerLukas Slebodnik <lslebodn@redhat.com>2015-09-26 15:45:19 +0200
commitafdc0179af0ad8ddbedd67422193ef02dcd2bf84 (patch)
treef8e595f6e1ad8ec01a4f7786b40ac604d27ff161
parentd9378e64499642e86989158f274372187314d5b2 (diff)
downloadsssd-afdc0179af0ad8ddbedd67422193ef02dcd2bf84.tar.gz
sssd-afdc0179af0ad8ddbedd67422193ef02dcd2bf84.tar.xz
sssd-afdc0179af0ad8ddbedd67422193ef02dcd2bf84.zip
IFP: Suppress warning from static analyzer
It seems that clang expected that errno can change to 0 in case of error. It might be a bug in static analyzer. But the workaround does not change the logic and the errno is read just once.
-rw-r--r--src/responder/ifp/ifp_groups.c4
-rw-r--r--src/responder/ifp/ifp_users.c4
-rw-r--r--src/responder/ifp/ifpsrv.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/responder/ifp/ifp_groups.c b/src/responder/ifp/ifp_groups.c
index 306003592..d5d7324da 100644
--- a/src/responder/ifp/ifp_groups.c
+++ b/src/responder/ifp/ifp_groups.c
@@ -68,8 +68,8 @@ static errno_t ifp_groups_decompose_path(struct sss_domain_info *domains,
}
gid = strtouint32(parts[1], NULL, 10);
- if (errno != 0) {
- ret = errno;
+ ret = errno;
+ if (ret != EOK) {
goto done;
}
diff --git a/src/responder/ifp/ifp_users.c b/src/responder/ifp/ifp_users.c
index effefdc04..9b71a3538 100644
--- a/src/responder/ifp/ifp_users.c
+++ b/src/responder/ifp/ifp_users.c
@@ -70,8 +70,8 @@ static errno_t ifp_users_decompose_path(struct sss_domain_info *domains,
}
uid = strtouint32(parts[1], NULL, 10);
- if (errno != 0) {
- ret = errno;
+ ret = errno;
+ if (ret != EOK) {
goto done;
}
diff --git a/src/responder/ifp/ifpsrv.c b/src/responder/ifp/ifpsrv.c
index cdc411faa..83e5ad395 100644
--- a/src/responder/ifp/ifpsrv.c
+++ b/src/responder/ifp/ifpsrv.c
@@ -338,8 +338,8 @@ int ifp_process_init(TALLOC_CTX *mem_ctx,
if (wildcard_limit_str) {
ifp_ctx->wildcard_limit = strtouint32(wildcard_limit_str, NULL, 10);
- if (errno != 0) {
- ret = errno;
+ ret = errno;
+ if (ret != EOK) {
goto fail;
}
}