summaryrefslogtreecommitdiffstats
path: root/src/providers
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2017-02-16 09:15:29 +0100
committerJakub Hrozek <jhrozek@redhat.com>2017-02-22 14:14:27 +0100
commit1f49be4429c17475b789e9089ce4d0ae48315e74 (patch)
treeed1044000da67fbd5ce57463c87441224faf847a /src/providers
parent86bcc81a665dde4799d67ab7ea2bbd23608e7dab (diff)
downloadsssd-1f49be4429c17475b789e9089ce4d0ae48315e74.tar.gz
sssd-1f49be4429c17475b789e9089ce4d0ae48315e74.tar.xz
sssd-1f49be4429c17475b789e9089ce4d0ae48315e74.zip
FILES: Remove unnecessary check
"grp_iter->gr_mem" is an array of strings and not just a string. We tried to compare first string to NULL (acctually '\0') But after that we iterated over the array to find count of members and we check for NULL one more time. Reviewed-by: Fabiano FidĂȘncio <fidencio@redhat.com>
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/files/files_ops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/providers/files/files_ops.c b/src/providers/files/files_ops.c
index 9ebf3b11b..370dcd971 100644
--- a/src/providers/files/files_ops.c
+++ b/src/providers/files/files_ops.c
@@ -189,7 +189,7 @@ static errno_t enum_files_groups(TALLOC_CTX *mem_ctx,
}
grp->gr_passwd = talloc_strdup(grp, grp_iter->gr_passwd);
- if (grp_iter->gr_mem != NULL && grp_iter->gr_mem[0] != '\0') {
+ if (grp_iter->gr_mem != NULL) {
size_t nmem;
for (nmem = 0; grp_iter->gr_mem[nmem] != NULL; nmem++);