diff options
author | harti <harti@FreeBSD.org> | 2004-12-01 10:29:20 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2004-12-01 10:29:20 +0000 |
commit | cf2c3cae344e2c0fd2316b579a8e3698105b58d1 (patch) | |
tree | d8d62254033c89332ede3fdf3277528114f7a6b5 /usr.bin/make/for.c | |
parent | a50f0bcbfd79a523bed7c5e00964a797edad9ff7 (diff) | |
download | FreeBSD-src-cf2c3cae344e2c0fd2316b579a8e3698105b58d1.zip FreeBSD-src-cf2c3cae344e2c0fd2316b579a8e3698105b58d1.tar.gz |
Style: remove a lot of unnecessary casts, add some and spell the null
pointer constant as NULL.
Checked by: diff -r on the object files before and after
Diffstat (limited to 'usr.bin/make/for.c')
-rw-r--r-- | usr.bin/make/for.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/make/for.c b/usr.bin/make/for.c index d7ed7c7..72d27cb 100644 --- a/usr.bin/make/for.c +++ b/usr.bin/make/for.c @@ -175,7 +175,7 @@ For_Eval(char *line) #define ADDWORD() \ Buf_AddBytes(buf, ptr - wrd, (Byte *)wrd), \ Buf_AddByte(buf, (Byte)'\0'), \ - Lst_AtFront(forLst, (void *)Buf_GetAll(buf, &varlen)), \ + Lst_AtFront(forLst, Buf_GetAll(buf, &varlen)), \ Buf_Destroy(buf, FALSE) for (ptr = sub; *ptr && isspace((unsigned char)*ptr); ptr++) @@ -246,9 +246,10 @@ For_Eval(char *line) static int ForExec(void *namep, void *argp) { - char *name = (char *) namep; - For *arg = (For *) argp; + char *name = namep; + For *arg = argp; int len; + Var_Set(arg->var, name, VAR_GLOBAL); DEBUGF(FOR, ("--- %s = %s\n", arg->var, name)); Parse_FromString(Var_Subst(arg->var, (char *)Buf_GetAll(arg->buf, &len), @@ -286,7 +287,7 @@ For_Run(int lineno) forBuf = NULL; forLst = NULL; - Lst_ForEach(arg.lst, ForExec, (void *)&arg); + Lst_ForEach(arg.lst, ForExec, &arg); free(arg.var); Lst_Destroy(arg.lst, free); |