]> granicus.if.org Git - sudo/commitdiff
added prototypes
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 28 May 1994 19:13:27 +0000 (19:13 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 28 May 1994 19:13:27 +0000 (19:13 +0000)
check.c
logging.c
sudo.c

diff --git a/check.c b/check.c
index b92388f1d5ce315a129ec6d59ed3e0db9c251a31..4c40efa7a58906eab41f95be25ae6ba533779dfe 100644 (file)
--- a/check.c
+++ b/check.c
@@ -64,15 +64,21 @@ static char rcsid[] = "$Id$";
 #include <shadow.h>
 #endif /* __svr4__ */
 
-extern char *getpass();
+extern char *getpass           __P((char *));
 
-static int check_timestamp();
-static void check_passwd();
-static void update_timestamp();
-static void reminder();
-static char *timestampfile_p;
+/*
+ * Prototypes for local functions
+ */
+static int   check_timestamp   __P((void));
+static void  check_passwd      __P((void));
+static void  update_timestamp  __P((void));
+static void  reminder          __P((void));
 
-static int timedir_is_good;
+/*
+ * Globals
+ */
+static int   timedir_is_good;
+static char *timestampfile_p;
 
 
 /********************************************************************
index 72dfdcde2b56951094f37341482d231878da113c..4f7202b762ef7346c3a77e521dacdcdb6d9dc343 100644 (file)
--- a/logging.c
+++ b/logging.c
@@ -60,14 +60,19 @@ static char rcsid[] = "$Id$";
 #include <sys/errno.h>
 #include "sudo.h"
 
-void log_error();
-void readchild();
-static void send_mail();
-static RETSIGTYPE reapchild();
-static int appropriate();
+/*
+ * Prototypes for local functions
+ */
+static void send_mail          __P((void));
+static RETSIGTYPE reapchild    __P((int));
+static int appropriate         __P((int));
 
+/*
+ * Globals
+ */
 static char logline[MAXLOGLEN + 8];
 
+
 /**********************************************************************
  *
  *  log_error()
diff --git a/sudo.c b/sudo.c
index d83c507be59bc3aee63b9140f80112861510aad6..05991a8b3dde99805eecf7dba36e0fee1fc76ab1 100644 (file)
--- a/sudo.c
+++ b/sudo.c
@@ -92,6 +92,14 @@ extern char *strdup();
 #endif /* STDC_HEADERS */
 
 
+/*
+ * local functions not visible outside sudo.c
+ */
+static void usage              __P((void));
+static void load_globals       __P((void));
+static void rmenv              __P((char **, char *, int));
+static void clean_env          __P((char **));
+
 /*
  * Globals
  */
@@ -104,15 +112,6 @@ char cwd[MAXPATHLEN + 1];
 uid_t uid = -2;
 
 
-/*
- * local functions not visible outside sudo.c
- */
-static void usage();
-static void load_globals();
-static void rmenv();
-static void clean_env();
-
-
 /********************************************************************
  *
  *  main ()
@@ -275,7 +274,7 @@ static void load_globals()
      * loading the host global variable from gethostname() & gethostbyname()
      */
     if ((gethostname(host, MAXHOSTNAMELEN))) {
-       strcpy(host, "amnesiac");
+       strcpy(host, "localhost");
        log_error(GLOBAL_NO_HOSTNAME);
        inform_user(GLOBAL_NO_HOSTNAME);
     } else {