diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2015-01-23 13:18:41 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2015-01-23 13:18:41 +0000 |
commit | b30798043696f6ff6eff1386d403a48df3736bce (patch) | |
tree | c33059e46f14f18420ea15bcc1bbd62e598984c6 /usr.bin/make/dump.c | |
parent | 978b506d416f12d7c4a6fb11564130d4cf13dd63 (diff) |
remove a bunch of dangerous casts (useless casts from void * to something
else, in some cases by adding extra temporary variables.
IMO, it's much better practice to do
void *a;
int *p = a;
*p = 42;
rather than
void *a;
*(int *)a = 42;
okay miod@... to be revisited for some possible const additions later.
Diffstat (limited to 'usr.bin/make/dump.c')
-rw-r--r-- | usr.bin/make/dump.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/make/dump.c b/usr.bin/make/dump.c index 3b688f74c9e..accba322f83 100644 --- a/usr.bin/make/dump.c +++ b/usr.bin/make/dump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dump.c,v 1.6 2014/05/18 08:08:50 espie Exp $ */ +/* $OpenBSD: dump.c,v 1.7 2015/01/23 13:18:40 espie Exp $ */ /* * Copyright (c) 2012 Marc Espie. * @@ -82,7 +82,7 @@ sort_ohash(struct ohash *h, int (*comparison)(const void *, const void *)) static void TargPrintName(void *gnp) { - GNode *gn = (GNode *)gnp; + GNode *gn = gnp; printf("%s ", gn->name); } |