diff options
Diffstat (limited to 'locale')
-rw-r--r-- | locale/nl_langinfo.c | 3 | ||||
-rw-r--r-- | locale/nl_langinfo_l.c | 4 | ||||
-rw-r--r-- | locale/programs/simple-hash.c | 25 | ||||
-rw-r--r-- | locale/programs/xmalloc.c | 10 | ||||
-rw-r--r-- | locale/programs/xstrdup.c | 3 |
5 files changed, 12 insertions, 33 deletions
diff --git a/locale/nl_langinfo.c b/locale/nl_langinfo.c index ccd7ea4001..69749a40f3 100644 --- a/locale/nl_langinfo.c +++ b/locale/nl_langinfo.c @@ -26,8 +26,7 @@ /* Return a string with the data for locale-dependent parameter ITEM. */ char * -nl_langinfo (item) - nl_item item; +nl_langinfo (nl_item item) { return __nl_langinfo_l (item, _NL_CURRENT_LOCALE); } diff --git a/locale/nl_langinfo_l.c b/locale/nl_langinfo_l.c index 156e09a32f..db2b094cda 100644 --- a/locale/nl_langinfo_l.c +++ b/locale/nl_langinfo_l.c @@ -27,9 +27,7 @@ /* Return a string with the data for locale-dependent parameter ITEM. */ char * -__nl_langinfo_l (item, l) - nl_item item; - __locale_t l; +__nl_langinfo_l (nl_item item, __locale_t l) { int category = _NL_ITEM_CATEGORY (item); unsigned int index = _NL_ITEM_INDEX (item); diff --git a/locale/programs/simple-hash.c b/locale/programs/simple-hash.c index a4412f9787..2c81185165 100644 --- a/locale/programs/simple-hash.c +++ b/locale/programs/simple-hash.c @@ -66,9 +66,7 @@ static int is_prime (unsigned long int candidate); int -init_hash (htab, init_size) - hash_table *htab; - unsigned long int init_size; +init_hash (hash_table *htab, unsigned long int init_size) { /* We need the size to be a prime. */ init_size = next_prime (init_size); @@ -88,8 +86,7 @@ init_hash (htab, init_size) int -delete_hash (htab) - hash_table *htab; +delete_hash (hash_table *htab) { free (htab->table); obstack_free (&htab->mem_pool, NULL); @@ -98,11 +95,7 @@ delete_hash (htab) int -insert_entry (htab, key, keylen, data) - hash_table *htab; - const void *key; - size_t keylen; - void *data; +insert_entry (hash_table *htab, const void *key, size_t keylen, void *data) { unsigned long int hval = compute_hashval (key, keylen); hash_entry *table = (hash_entry *) htab->table; @@ -194,11 +187,7 @@ find_entry (htab, key, keylen, result) int -set_entry (htab, key, keylen, newval) - hash_table *htab; - const void *key; - size_t keylen; - void *newval; +set_entry (hash_table *htab, const void *key, size_t keylen, void *newval) { hash_entry *table = (hash_entry *) htab->table; size_t idx = lookup (htab, key, keylen, compute_hashval (key, keylen)); @@ -287,8 +276,7 @@ lookup (htab, key, keylen, hval) unsigned long int -next_prime (seed) - unsigned long int seed; +next_prime (unsigned long int seed) { /* Make it definitely odd. */ seed |= 1; @@ -301,8 +289,7 @@ next_prime (seed) static int -is_prime (candidate) - unsigned long int candidate; +is_prime (unsigned long int candidate) { /* No even number and none less than 10 will be passed here. */ unsigned long int divn = 3; diff --git a/locale/programs/xmalloc.c b/locale/programs/xmalloc.c index 36bc17fe89..2528c5f379 100644 --- a/locale/programs/xmalloc.c +++ b/locale/programs/xmalloc.c @@ -52,8 +52,7 @@ void free (); int xmalloc_exit_failure = EXIT_FAILURE; static VOID * -fixup_null_alloc (n) - size_t n; +fixup_null_alloc (size_t n) { VOID *p; @@ -68,8 +67,7 @@ fixup_null_alloc (n) /* Allocate N bytes of memory dynamically, with error checking. */ VOID * -xmalloc (n) - size_t n; +xmalloc (size_t n) { VOID *p; @@ -98,9 +96,7 @@ xcalloc (n, s) If P is NULL, run xmalloc. */ VOID * -xrealloc (p, n) - VOID *p; - size_t n; +xrealloc (VOID *p, size_t n) { if (p == 0) return xmalloc (n); diff --git a/locale/programs/xstrdup.c b/locale/programs/xstrdup.c index a8fadb3d15..445d67cd41 100644 --- a/locale/programs/xstrdup.c +++ b/locale/programs/xstrdup.c @@ -30,8 +30,7 @@ char *xstrdup (char *string) __THROW; /* Return a newly allocated copy of STRING. */ char * -xstrdup (string) - char *string; +xstrdup (char *string) { return strcpy (xmalloc (strlen (string) + 1), string); } |