From b6b00dd55e035bfbe311a527b567962ffa77ee43 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 26 Jun 2024 18:18:37 +0200 Subject: Merging upstream version 1:4.15.2. Signed-off-by: Daniel Baumann --- src/grpck.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/grpck.c') diff --git a/src/grpck.c b/src/grpck.c index 881fb4d..4ef1b15 100644 --- a/src/grpck.c +++ b/src/grpck.c @@ -43,7 +43,7 @@ /* * Global variables */ -const char *Prog; +static const char Prog[] = "grpck"; static const char *grp_file = GROUP_FILE; static bool use_system_grp_file = true; @@ -62,7 +62,7 @@ static bool silence_warnings = false; /* local function prototypes */ static void fail_exit (int status); -static /*@noreturn@*/void usage (int status); +NORETURN static void usage (int status); static void delete_member (char **, const char *); static void process_flags (int argc, char **argv); static void open_files (void); @@ -114,7 +114,9 @@ static void fail_exit (int status) /* * usage - print syntax message and exit */ -static /*@noreturn@*/void usage (int status) +NORETURN +static void +usage (int status) { FILE *usageout = (E_SUCCESS != status) ? stderr : stdout; #ifdef SHADOWGRP @@ -814,10 +816,6 @@ int main (int argc, char **argv) int errors = 0; bool changed = false; - /* - * Get my name so that I can use it to report errors. - */ - Prog = Basename (argv[0]); log_set_progname(Prog); log_set_logfd(stderr); @@ -827,7 +825,7 @@ int main (int argc, char **argv) process_root_flag ("-R", argc, argv); - OPENLOG ("grpck"); + OPENLOG (Prog); /* Parse the command line arguments */ process_flags (argc, argv); -- cgit v1.2.3