Mercurial > hg > forks > yadex
diff src/wads.cc @ 79:0602d9bf474a
Various cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 26 Sep 2011 17:14:54 +0300 |
parents | a68786b9c74b |
children | 2f1ecc1c5f72 |
line wrap: on
line diff
--- a/src/wads.cc Mon Sep 26 17:05:58 2011 +0300 +++ b/src/wads.cc Mon Sep 26 17:14:54 2011 +0300 @@ -172,13 +172,13 @@ MDirPtr FindMasterDir(MDirPtr from, const char *name) { - while (from) + while (from != NULL) { if (!y_strnicmp(from->dir.name, name, WAD_NAME)) - break; + return from; from = from->next; } - return from; + return NULL; } @@ -187,14 +187,14 @@ */ MDirPtr FindMasterDir(MDirPtr from, const char *name1, const char *name2) { - while (from) + while (from != NULL) { - if (!y_strnicmp(from->dir.name, name1, WAD_NAME) - || !y_strnicmp(from->dir.name, name2, WAD_NAME)) - break; + if (!y_strnicmp(from->dir.name, name1, WAD_NAME) || + !y_strnicmp(from->dir.name, name2, WAD_NAME)) + return from; from = from->next; } - return from; + return NULL; } @@ -262,7 +262,6 @@ } byebye: - if (data != 0) - FreeMemory(data); + FreeMemory(data); return rc; }