Use NULL instead of (FOO *)0, it's easier to read.

This commit is contained in:
Markus Armbruster 2006-03-23 20:48:49 +00:00
parent 3252f8a907
commit 21bf6b41d4
23 changed files with 75 additions and 79 deletions

View file

@ -85,9 +85,9 @@ as_add_cachepath(struct as_data *adp)
/* Note we will only allocate this once. Afterwards, we just keep
* zeroing it since it's rather small and we don't need to re-allocate
* each time. */
if (fromhead == (struct as_frompath **)0) {
if (fromhead == NULL) {
fromhead = calloc(1, sizeof(struct as_frompath *) * WORLD_Y);
if (fromhead == (struct as_frompath **)0)
if (fromhead == NULL)
return;
}
@ -143,7 +143,7 @@ as_clear_cachepath(void)
int i, j;
/* Cache not used yet :) */
if (fromhead == (struct as_frompath **)0)
if (fromhead == NULL)
return;
for (j = 0; j < WORLD_Y; j++) {
@ -181,7 +181,7 @@ as_find_cachepath(coord fx, coord fy, coord tx, coord ty)
return NULL;
/* Do we have any cached? */
if (fromhead == (struct as_frompath **)0)
if (fromhead == NULL)
return NULL;
/* Yes! */