From: Todd C. Miller Date: Sat, 28 May 1994 20:23:46 +0000 (+0000) Subject: added prototypes & moved sig handler around X-Git-Tag: SUDO_1_3_1~225 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d1600cf97de67326aac37eb7151e6088b6ded8b;p=sudo added prototypes & moved sig handler around --- diff --git a/visudo.c b/visudo.c index 5c59bc7cb..19f28dc93 100644 --- a/visudo.c +++ b/visudo.c @@ -76,21 +76,12 @@ int status = 0, FILE *sudoers_tmp_fp=NULL, *sudoers_fp=NULL; + /* * local functions not visible outside visudo.c */ -static void usage(); - - -static RETSIGTYPE Exit(sig) - int sig; -{ - if (sudoers_tmp_fp) - (void) fclose(sudoers_tmp_fp); - - (void) unlink(sudoers_tmp_file); - exit(1); -} +static void usage __P((void)); +static RETSIGTYPE Exit __P((int)); main(argc, argv) @@ -276,3 +267,21 @@ static void usage() (void) fprintf(stderr, "usage: %s [-v]\n", *Argv); exit(1); } + + +/********************************************************************** + * + * Exit() + * + * this function cleans up and exits + */ + +static RETSIGTYPE Exit(sig) + int sig; +{ + if (sudoers_tmp_fp) + (void) fclose(sudoers_tmp_fp); + + (void) unlink(sudoers_tmp_file); + exit(1); +}