]> granicus.if.org Git - sudo/commitdiff
added prototypes & moved sig handler around
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 28 May 1994 20:23:46 +0000 (20:23 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 28 May 1994 20:23:46 +0000 (20:23 +0000)
visudo.c

index 5c59bc7cb7c52d87bf5c0bfa9bbe87571807c543..19f28dc93c964c9f170885c4a27b4157b57ab1a2 100644 (file)
--- 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);
+}