From: nekral-guest Date: Sat, 5 Jan 2008 13:37:32 +0000 (+0000) Subject: * libmisc/pam_pass.c: Define do_pam_passwd() as static and add its prototype. X-Git-Tag: 4.1.1~147 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=53b075a76004d283d699e497aa49e255524113d9;p=shadow * libmisc/pam_pass.c: Define do_pam_passwd() as static and add its prototype. * libmisc/log.c: Define dolastlog() as static and add its prototype. * src/chage.c: Define isnum() as static and add its prototype. --- diff --git a/ChangeLog b/ChangeLog index dbed65a6..785a420c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,11 @@ prototype. * libmisc/xgetXXbyYY.c, libmisc/yesno.c: Include config.h as a system include, as recommended by the autoconf documentation. + * libmisc/pam_pass.c: Define do_pam_passwd() as static and add its + prototype. + * libmisc/log.c: Define dolastlog() as static and add its + prototype. + * src/chage.c: Define isnum() as static and add its prototype. 2008-01-01 Nicolas François diff --git a/libmisc/log.c b/libmisc/log.c index c870a42b..77ac87c8 100644 --- a/libmisc/log.c +++ b/libmisc/log.c @@ -37,6 +37,13 @@ #include #include "defines.h" #include + +/* local function prototypes */ +static void dolastlog (struct lastlog *ll, + const struct passwd *pw, + const char *line, + const char *host); + /* * dolastlog - create lastlog entry * @@ -44,7 +51,7 @@ * UID is extracted from the global (struct passwd) entry and the * TTY information is gotten from the (struct utmp). */ -void +static void dolastlog (struct lastlog *ll, const struct passwd *pw, const char *line, const char *host) { diff --git a/libmisc/pam_pass.c b/libmisc/pam_pass.c index 6edc7212..09b460b5 100644 --- a/libmisc/pam_pass.c +++ b/libmisc/pam_pass.c @@ -18,7 +18,10 @@ #include "defines.h" #include "pam_defs.h" -void do_pam_passwd (const char *user, int silent, int change_expired) +/* local function prototypes */ +static void do_pam_passwd (const char *user, int silent, int change_expired); + +static void do_pam_passwd (const char *user, int silent, int change_expired) { pam_handle_t *pamh = NULL; int flags = 0, ret; diff --git a/src/chage.c b/src/chage.c index bbaf99f2..4cce6f31 100644 --- a/src/chage.c +++ b/src/chage.c @@ -87,6 +87,7 @@ static pam_handle_t *pamh = NULL; #define EPOCH "1969-12-31" /* local function prototypes */ +static int isnum (const char *s); static void usage (void); static void date_to_str (char *, size_t, time_t); static int new_fields (void); @@ -135,7 +136,7 @@ static void fail_exit (int code) /* * isnum - determine whether or not a string is a number */ -int isnum (const char *s) +static int isnum (const char *s) { while ('\0' != *s) { if (!isdigit (*s)) {