Remove pointless check for unsigned number < 0 in get_window_by_refnum()

This commit is contained in:
Kevin Easton
2017-11-09 23:50:13 +11:00
parent ce55f5eaa8
commit 8a176c6950

View File

@@ -1204,14 +1204,13 @@ Window * BX_get_window_by_refnum(unsigned int refnum)
{ {
Window *tmp = NULL; Window *tmp = NULL;
if (refnum < 0)
return NULL;
if (refnum == 0) if (refnum == 0)
return current_window; return current_window;
else while ((traverse_all_windows(&tmp)))
while ((traverse_all_windows(&tmp)))
{ {
if (tmp->refnum == refnum) if (tmp->refnum == refnum)
return (tmp); return tmp;
} }
return NULL; return NULL;
} }