diff options
author | 2016-01-09 21:54:11 +0000 | |
---|---|---|
committer | 2016-01-09 21:54:11 +0000 | |
commit | 6acf840eb12048fe6e815d917fa237f8a82441d8 (patch) | |
tree | 2b30fa6c735dd1c988490fb02d83b76d543e3560 | |
parent | Replace "function call" with "function" when referring to a function (diff) | |
download | wireguard-openbsd-6acf840eb12048fe6e815d917fa237f8a82441d8.tar.xz wireguard-openbsd-6acf840eb12048fe6e815d917fa237f8a82441d8.zip |
Remove several casts to (char *) 0 and replace them by NULL
Prompted and OK by tb@
-rw-r--r-- | games/hack/hack.apply.c | 4 | ||||
-rw-r--r-- | games/hack/hack.eat.c | 4 | ||||
-rw-r--r-- | games/hack/hack.end.c | 4 | ||||
-rw-r--r-- | games/hack/hack.engrave.c | 4 | ||||
-rw-r--r-- | games/hack/hack.invent.c | 12 | ||||
-rw-r--r-- | games/hack/hack.ioctl.c | 4 | ||||
-rw-r--r-- | games/hack/hack.main.c | 4 | ||||
-rw-r--r-- | games/hack/hack.o_init.c | 6 | ||||
-rw-r--r-- | games/hack/hack.pager.c | 10 | ||||
-rw-r--r-- | games/hack/hack.unix.c | 4 |
10 files changed, 28 insertions, 28 deletions
diff --git a/games/hack/hack.apply.c b/games/hack/hack.apply.c index 32a862b028e..c85f0310267 100644 --- a/games/hack/hack.apply.c +++ b/games/hack/hack.apply.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hack.apply.c,v 1.7 2016/01/09 18:33:15 mestre Exp $ */ +/* $OpenBSD: hack.apply.c,v 1.8 2016/01/09 21:54:11 mestre Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -481,7 +481,7 @@ use_pick_axe(struct obj *obj) && !sobj_at(ENORMOUS_ROCK, rx, ry)) { /* ACCESSIBLE or POOL */ pline("You swing your %s through thin air.", - aobjnam(obj, (char *) 0)); + aobjnam(obj, NULL)); } else { if(dig_pos.x != rx || dig_pos.y != ry || dig_level != dlevel || dig_down) { diff --git a/games/hack/hack.eat.c b/games/hack/hack.eat.c index beb97494ed5..79ab4217991 100644 --- a/games/hack/hack.eat.c +++ b/games/hack/hack.eat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hack.eat.c,v 1.10 2016/01/09 18:33:15 mestre Exp $ */ +/* $OpenBSD: hack.eat.c,v 1.11 2016/01/09 21:54:11 mestre Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -207,7 +207,7 @@ gotit: goto no_opener; } pline("Using your %s you try to open the tin.", - aobjnam(uwep, (char *) 0)); + aobjnam(uwep, NULL)); } else { no_opener: pline("It is not so easy to open this tin."); diff --git a/games/hack/hack.end.c b/games/hack/hack.end.c index 421dc2a6d19..e4d4c4c5f18 100644 --- a/games/hack/hack.end.c +++ b/games/hack/hack.end.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hack.end.c,v 1.15 2016/01/09 18:33:15 mestre Exp $ */ +/* $OpenBSD: hack.end.c,v 1.16 2016/01/09 21:54:11 mestre Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -203,7 +203,7 @@ done(char *st1) outrip(); } if(*st1 == 'c') killer = st1; /* after outrip() */ - settty((char *) 0); /* does a clr_screen() */ + settty(NULL); /* does a clr_screen() */ if(!done_stopprint) printf("Goodbye %s %s...\n\n", pl_character, plname); { long int tmp; diff --git a/games/hack/hack.engrave.c b/games/hack/hack.engrave.c index f48c871ce90..e9085ca0b82 100644 --- a/games/hack/hack.engrave.c +++ b/games/hack/hack.engrave.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hack.engrave.c,v 1.8 2016/01/09 18:33:15 mestre Exp $ */ +/* $OpenBSD: hack.engrave.c,v 1.9 2016/01/09 21:54:11 mestre Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -228,7 +228,7 @@ doengrave(void) if(uwep && uwep->cursed) { /* Andreas Bormann */ pline("Since your weapon is welded to your hand,"); - pline("you use the %s.", aobjnam(uwep, (char *) 0)); + pline("you use the %s.", aobjnam(uwep, NULL)); otmp = uwep; } else { if(!otmp) diff --git a/games/hack/hack.invent.c b/games/hack/hack.invent.c index b5a4a564ae2..c949a613a9b 100644 --- a/games/hack/hack.invent.c +++ b/games/hack/hack.invent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hack.invent.c,v 1.13 2016/01/09 18:33:15 mestre Exp $ */ +/* $OpenBSD: hack.invent.c,v 1.14 2016/01/09 21:54:11 mestre Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -469,7 +469,7 @@ getobj(char *let, char *word) if(!(ilet = morc)) continue; /* he typed a letter (not a space) to more() */ } else if(ilet == '*') { - doinv((char *) 0); + doinv(NULL); if(!(ilet = morc)) continue; /* ... */ } @@ -667,7 +667,7 @@ xprname(struct obj *obj, char let) int ddoinv(void) { - doinv((char *) 0); + doinv(NULL); return(0); } @@ -688,7 +688,7 @@ doinv(char *lets) return; } - cornline(0, (char *) 0); + cornline(0, NULL); ilet = 'a'; for(otmp = invent; otmp; otmp = otmp->nobj) { if(flags.invlet_constant) ilet = otmp->invlet; @@ -827,10 +827,10 @@ dolook(void) if(ct == 1 && !gold) { pline("You %s here %s.", verb, doname(otmp0)); - cornline(3, (char *) 0); + cornline(3, NULL); } if(ct > 1) - cornline(2, (char *) 0); + cornline(2, NULL); return(!!Blind); } diff --git a/games/hack/hack.ioctl.c b/games/hack/hack.ioctl.c index 6c69a5d191c..30da45629e2 100644 --- a/games/hack/hack.ioctl.c +++ b/games/hack/hack.ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hack.ioctl.c,v 1.9 2016/01/09 18:33:15 mestre Exp $ */ +/* $OpenBSD: hack.ioctl.c,v 1.10 2016/01/09 21:54:11 mestre Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -90,7 +90,7 @@ dosuspend(void) { #ifdef SIGTSTP if(signal(SIGTSTP, SIG_IGN) == SIG_DFL) { - settty((char *) 0); + settty(NULL); (void) signal(SIGTSTP, SIG_DFL); (void) kill(0, SIGTSTP); gettty(); diff --git a/games/hack/hack.main.c b/games/hack/hack.main.c index b9d81efd9cc..c879206b4da 100644 --- a/games/hack/hack.main.c +++ b/games/hack/hack.main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hack.main.c,v 1.21 2016/01/09 18:33:15 mestre Exp $ */ +/* $OpenBSD: hack.main.c,v 1.22 2016/01/09 21:54:11 mestre Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -452,7 +452,7 @@ not_recovered: #ifdef MAIL ckmailstatus(); #endif - rhack((char *) 0); + rhack(NULL); } if(multi && multi%7 == 0) (void) fflush(stdout); diff --git a/games/hack/hack.o_init.c b/games/hack/hack.o_init.c index 3e31aa93549..cb01e1c90b4 100644 --- a/games/hack/hack.o_init.c +++ b/games/hack/hack.o_init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hack.o_init.c,v 1.7 2016/01/09 18:33:15 mestre Exp $ */ +/* $OpenBSD: hack.o_init.c,v 1.8 2016/01/09 21:54:11 mestre Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -220,9 +220,9 @@ dodiscovered(void) /* free after Robert Viduya */ } if (ct == 0) { pline ("You haven't discovered anything yet..."); - cornline(3, (char *) 0); + cornline(3, NULL); } else - cornline(2, (char *) 0); + cornline(2, NULL); return(0); } diff --git a/games/hack/hack.pager.c b/games/hack/hack.pager.c index 1a2789268a4..748599a3519 100644 --- a/games/hack/hack.pager.c +++ b/games/hack/hack.pager.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hack.pager.c,v 1.22 2016/01/09 18:33:15 mestre Exp $ */ +/* $OpenBSD: hack.pager.c,v 1.23 2016/01/09 21:54:11 mestre Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -383,7 +383,7 @@ page_file(char *fnam, boolean silent) if(dup(fd)) { if(!silent) printf("Cannot open %s as stdin.\n", fnam); } else { - execlp(catmore, basename(catmore), (char *) 0); + execlp(catmore, basename(catmore), NULL); if(!silent) printf("Cannot exec %s.\n", catmore); } exit(1); @@ -417,9 +417,9 @@ dosh(void) if(child(0)) { if ((str = getenv("SHELL"))) - execlp(str, str, (char *) 0); + execlp(str, str, NULL); else - execl("/bin/sh", "sh", (char *) 0); + execl("/bin/sh", "sh", NULL); pline("sh: cannot execute."); exit(1); } @@ -439,7 +439,7 @@ child(int wt) f = fork(); if(f == 0){ /* child */ - settty((char *) 0); /* also calls end_screen() */ + settty(NULL); /* also calls end_screen() */ /* revoke privs */ gid = getgid(); setresgid(gid, gid, gid); diff --git a/games/hack/hack.unix.c b/games/hack/hack.unix.c index 9d4afb2750d..c53003bd1b9 100644 --- a/games/hack/hack.unix.c +++ b/games/hack/hack.unix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hack.unix.c,v 1.17 2016/01/09 18:33:15 mestre Exp $ */ +/* $OpenBSD: hack.unix.c,v 1.18 2016/01/09 21:54:11 mestre Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -471,7 +471,7 @@ readmail(void) if(!(mr = getenv("MAILREADER"))) mr = DEF_MAILREADER; if(child(1)){ - execl(mr, mr, (char *) 0); + execl(mr, mr, NULL); exit(1); } #else /* DEF_MAILREADER */ |