]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
src/gpasswd.c: Remove unused parameter $1 of check_perms()
authorAlejandro Colomar <alx@kernel.org>
Thu, 20 Feb 2025 16:46:23 +0000 (17:46 +0100)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Thu, 6 Nov 2025 11:50:49 +0000 (12:50 +0100)
Fixes: 53e1eb404541 (2024-07-01; "src/: Remove dead code")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/gpasswd.c

index 42ac0ff3976af65df6cac39eb3bf1aa0b925fbe4..6dec40d662816c8e7aa058228f21280d3f09b415 100644 (file)
@@ -99,12 +99,12 @@ static void open_files (void);
 static void close_files (struct option_flags *flags);
 #ifdef SHADOWGRP
 static void get_group (struct group *gr, struct sgrp *sg, struct option_flags *flags);
-static void check_perms (const struct group *gr, const struct sgrp *sg);
+static void check_perms(const struct sgrp *sg);
 static void update_group (struct group *gr, struct sgrp *sg);
 static void change_passwd (struct group *gr, struct sgrp *sg);
 #else
 static void get_group (struct group *gr, struct option_flags *flags);
-static void check_perms (const struct group *gr);
+static void check_perms(void);
 static void update_group (struct group *gr);
 static void change_passwd (struct group *gr);
 #endif
@@ -642,9 +642,9 @@ static void close_files (struct option_flags *flags)
  *     It only returns if the user is allowed.
  */
 #ifdef SHADOWGRP
-static void check_perms (const struct group *gr, const struct sgrp *sg)
+static void check_perms (const struct sgrp *sg)
 #else
-static void check_perms (const struct group *gr)
+static void check_perms (void)
 #endif
 {
        /*
@@ -954,9 +954,9 @@ int main (int argc, char **argv)
         * Check if the user is allowed to change the password of this group.
         */
 #ifdef SHADOWGRP
-       check_perms (&grent, &sgent);
+       check_perms(&sgent);
 #else
-       check_perms (&grent);
+       check_perms();
 #endif
 
        /*