]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
* src/login_nopam.c: Use an ANSI prototype for resolve_hostname()
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 6 Jan 2008 12:07:42 +0000 (12:07 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 6 Jan 2008 12:07:42 +0000 (12:07 +0000)
  instead of K&R prototype.
* src/login_nopam.c: Fix the prototypes of list_match(),
  user_match(), from_match(), string_match(). There were no
  parameters in the prototypes.
* src/login_nopam.c: Fix the prototypes of the function parameter
  match_fn of list_match().

ChangeLog
src/login_nopam.c

index a9ed2dbd681512eeaa5be937c281e70938024578..51b4b5b0a04188998151e2942aeb7c7c0b98b203 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-01-06  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/login_nopam.c: Use an ANSI prototype for resolve_hostname()
+       instead of K&R prototype.
+       * src/login_nopam.c: Fix the prototypes of list_match(),
+       user_match(), from_match(), string_match(). There were no
+       parameters in the prototypes.
+       * src/login_nopam.c: Fix the prototypes of the function parameter
+       match_fn of list_match().
+
 2008-01-06  Nicolas François  <nicolas.francois@centraliens.net>
 
        * libmisc/copydir.c: Remove the src parameter of copy_special().
index bc2f75d5eb0689155ca33b322d86b02934ecaaf8..858c9c4c50c68bb81cb31da15ab3d772149f7f39 100644 (file)
@@ -58,7 +58,6 @@
 #endif
 
  /* Path name of the access control file. */
-
 #ifndef        TABLE
 #define TABLE  "/etc/login.access"
 #endif
@@ -71,10 +70,11 @@ static char sep[] = ", \t"; /* list-element separator */
 #define YES             1
 #define NO              0
 
-static int list_match ();
-static int user_match ();
-static int from_match ();
-static int string_match ();
+static int list_match (char *list, const char *item, int (*match_fn) (const char *, const char *));
+static int user_match (const char *tok, const char *string);
+static int from_match (const char *tok, const char *string);
+static int string_match (const char *tok, const char *string);
+static const char *resolve_hostname (const char *string);
 
 /* login_access - match username/group and host/tty with access control file */
 int login_access (const char *user, const char *from)
@@ -137,7 +137,7 @@ int login_access (const char *user, const char *from)
 }
 
 /* list_match - match an item against a list of tokens with exceptions */
-static int list_match (char *list, const char *item, int (*match_fn) ())
+static int list_match (char *list, const char *item, int (*match_fn) (const char *, const char*))
 {
        char *tok;
        int match = NO;
@@ -245,8 +245,7 @@ static int user_match (const char *tok, const char *string)
        return (NO);
 }
 
-static const char *resolve_hostname (string)
-const char *string;
+static const char *resolve_hostname (const char *string)
 {
        /*
         * Resolve hostname to numeric IP address, as suggested