Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/ldconfig Convert from K&R to c89 function definitions.



details:   https://anonhg.NetBSD.org/src/rev/edde94f114ee
branches:  trunk
changeset: 778308:edde94f114ee
user:      he <he%NetBSD.org@localhost>
date:      Wed Mar 21 16:11:26 2012 +0000

description:
Convert from K&R to c89 function definitions.

diffstat:

 sbin/ldconfig/shlib.c |  25 ++++++++-----------------
 1 files changed, 8 insertions(+), 17 deletions(-)

diffs (81 lines):

diff -r 69aaa293f821 -r edde94f114ee sbin/ldconfig/shlib.c
--- a/sbin/ldconfig/shlib.c     Wed Mar 21 15:55:50 2012 +0000
+++ b/sbin/ldconfig/shlib.c     Wed Mar 21 16:11:26 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: shlib.c,v 1.1 2010/07/06 05:59:56 mrg Exp $    */
+/*     $NetBSD: shlib.c,v 1.2 2012/03/21 16:11:26 he Exp $     */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -74,8 +74,7 @@
 };
 
 static void
-add_search_dir(name)
-       const char      *name;
+add_search_dir(const char *name)
 {
        n_search_dirs += 2;
        search_dirs = (char **)
@@ -88,7 +87,7 @@
 }
 
 void
-std_search_path()
+std_search_path(void)
 {
        int     i, n;
 
@@ -105,9 +104,7 @@
  */
 
 int
-getdewey(dewey, cp)
-int    dewey[];
-char   *cp;
+getdewey(int dewey[], char *cp)
 {
        int     i, n;
 
@@ -136,9 +133,7 @@
  * Return  0 if equal.
  */
 int
-cmpndewey(d1, n1, d2, n2)
-int    d1[], d2[];
-int    n1, n2;
+cmpndewey(int d1[], int n1, int d2[], int n2)
 {
        register int    i;
 
@@ -172,8 +167,7 @@
  * Like malloc but get fatal error if memory is exhausted.
  */
 void *
-xmalloc(size)
-       size_t size;
+xmalloc(size_t size)
 {
        void    *result = (void *)malloc(size);
 
@@ -187,9 +181,7 @@
  * Like realloc but get fatal error if memory is exhausted.
  */
 void *
-xrealloc(ptr, size)
-       void *ptr;
-       size_t size;
+xrealloc(void *ptr, size_t size)
 {
        void    *result;
 
@@ -205,8 +197,7 @@
  * the strings S1, S2, S3.
  */
 char *
-concat(s1, s2, s3)
-       const char *s1, *s2, *s3;
+concat(const char *s1, const char *s2, const char *s3)
 {
        int     len1 = strlen(s1),
                len2 = strlen(s2),



Home | Main Index | Thread Index | Old Index