From afdc0179af0ad8ddbedd67422193ef02dcd2bf84 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Wed, 23 Sep 2015 13:24:53 +0200 Subject: 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. --- src/responder/ifp/ifp_groups.c | 4 ++-- src/responder/ifp/ifp_users.c | 4 ++-- src/responder/ifp/ifpsrv.c | 4 ++-- 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; } } -- cgit