URL: https://github.com/SSSD/sssd/pull/940
Author: elkoniu
 Title: #940: files_ops: Remove unused functions parameter
Action: opened

PR body:
"""
enum_files_users() and enum_files_groups() has access
to struct files_id_ctx without purpose.
This argument is not used by the functions directly
and not passed down to subfunctions.
"""

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/940/head:pr940
git checkout pr940
From e95dd928f560941d14613ce58b59e7a94b2f20f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20Po=C5=82awski?= <[email protected]>
Date: Thu, 14 Nov 2019 12:54:05 +0000
Subject: [PATCH] files_ops: Remove unused functions parameter

enum_files_users() and enum_files_groups() has access
to struct files_id_ctx without purpose.
This argument is not used by the functions directly
and not passed down to subfunctions.
---
 src/providers/files/files_ops.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/providers/files/files_ops.c b/src/providers/files/files_ops.c
index 74f77b5395..59fc20692f 100644
--- a/src/providers/files/files_ops.c
+++ b/src/providers/files/files_ops.c
@@ -45,7 +45,6 @@ struct files_ctx {
 };
 
 static errno_t enum_files_users(TALLOC_CTX *mem_ctx,
-                                struct files_id_ctx *id_ctx,
                                 const char *passwd_file,
                                 struct passwd ***_users)
 {
@@ -143,7 +142,6 @@ static errno_t enum_files_users(TALLOC_CTX *mem_ctx,
 }
 
 static errno_t enum_files_groups(TALLOC_CTX *mem_ctx,
-                                 struct files_id_ctx *id_ctx,
                                  const char *group_file,
                                  struct group ***_groups)
 {
@@ -465,8 +463,7 @@ errno_t sf_enum_users(struct files_id_ctx *id_ctx,
         return ENOMEM;
     }
 
-    ret = enum_files_users(tmp_ctx, id_ctx, passwd_file,
-                           &users);
+    ret = enum_files_users(tmp_ctx, passwd_file, &users);
     if (ret != EOK) {
         goto done;
     }
@@ -680,8 +677,7 @@ static errno_t sf_enum_groups(struct files_id_ctx *id_ctx,
         return ENOMEM;
     }
 
-    ret = enum_files_groups(tmp_ctx, id_ctx, group_file,
-                            &groups);
+    ret = enum_files_groups(tmp_ctx, group_file, &groups);
     if (ret != EOK) {
         goto done;
     }
_______________________________________________
sssd-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/[email protected]

Reply via email to