Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make remove unnecessary casts to void * functions (M...



details:   https://anonhg.NetBSD.org/src/rev/86558bf9600d
branches:  trunk
changeset: 583388:86558bf9600d
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Aug 04 00:20:12 2005 +0000

description:
remove unnecessary casts to void * functions (Max Okumoto)

diffstat:

 usr.bin/make/arch.c |   8 ++++----
 usr.bin/make/hash.c |  18 +++++++++---------
 2 files changed, 13 insertions(+), 13 deletions(-)

diffs (108 lines):

diff -r 6d21f942936d -r 86558bf9600d usr.bin/make/arch.c
--- a/usr.bin/make/arch.c       Wed Aug 03 23:08:19 2005 +0000
+++ b/usr.bin/make/arch.c       Thu Aug 04 00:20:12 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arch.c,v 1.45 2005/07/25 22:55:58 christos Exp $       */
+/*     $NetBSD: arch.c,v 1.46 2005/08/04 00:20:12 christos Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: arch.c,v 1.45 2005/07/25 22:55:58 christos Exp $";
+static char rcsid[] = "$NetBSD: arch.c,v 1.46 2005/08/04 00:20:12 christos Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)arch.c     8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: arch.c,v 1.45 2005/07/25 22:55:58 christos Exp $");
+__RCSID("$NetBSD: arch.c,v 1.46 2005/08/04 00:20:12 christos Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -688,7 +688,7 @@
 #endif
 
            he = Hash_CreateEntry(&ar->members, memName, (Boolean *)NULL);
-           Hash_SetValue(he, (ClientData)emalloc(sizeof(struct ar_hdr)));
+           Hash_SetValue(he, emalloc(sizeof(struct ar_hdr)));
            memcpy((Address)Hash_GetValue(he), (Address)&arh,
                sizeof(struct ar_hdr));
        }
diff -r 6d21f942936d -r 86558bf9600d usr.bin/make/hash.c
--- a/usr.bin/make/hash.c       Wed Aug 03 23:08:19 2005 +0000
+++ b/usr.bin/make/hash.c       Thu Aug 04 00:20:12 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hash.c,v 1.15 2005/07/25 22:55:58 christos Exp $       */
+/*     $NetBSD: hash.c,v 1.16 2005/08/04 00:20:12 christos Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: hash.c,v 1.15 2005/07/25 22:55:58 christos Exp $";
+static char rcsid[] = "$NetBSD: hash.c,v 1.16 2005/08/04 00:20:12 christos Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)hash.c     8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: hash.c,v 1.15 2005/07/25 22:55:58 christos Exp $");
+__RCSID("$NetBSD: hash.c,v 1.16 2005/08/04 00:20:12 christos Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -148,7 +148,7 @@
        t->numEntries = 0;
        t->size = i;
        t->mask = i - 1;
-       t->bucketPtr = hp = (struct Hash_Entry **)emalloc(sizeof(*hp) * i);
+       t->bucketPtr = hp = emalloc(sizeof(*hp) * i);
        while (--i >= 0)
                *hp++ = NULL;
 }
@@ -180,10 +180,10 @@
        for (hp = t->bucketPtr, i = t->size; --i >= 0;) {
                for (h = *hp++; h != NULL; h = nexth) {
                        nexth = h->next;
-                       free((char *)h);
+                       free(h);
                }
        }
-       free((char *)t->bucketPtr);
+       free(t->bucketPtr);
 
        /*
         * Set up the hash table to cause memory faults on any future access
@@ -329,7 +329,7 @@
             (p = *hp) != NULL; hp = &p->next) {
                if (p == e) {
                        *hp = p->next;
-                       free((char *)p);
+                       free(p);
                        t->numEntries--;
                        return;
                }
@@ -448,7 +448,7 @@
        i <<= 1;
        t->size = i;
        t->mask = mask = i - 1;
-       t->bucketPtr = hp = (struct Hash_Entry **)emalloc(sizeof(*hp) * i);
+       t->bucketPtr = hp = emalloc(sizeof(*hp) * i);
        while (--i >= 0)
                *hp++ = NULL;
        for (hp = oldhp, i = oldsize; --i >= 0;) {
@@ -459,5 +459,5 @@
                        *xp = e;
                }
        }
-       free((char *)oldhp);
+       free(oldhp);
 }



Home | Main Index | Thread Index | Old Index