author | tron |
Sun, 23 Jul 2006 17:17:43 +0000 | |
changeset 4165 | 2b5f642aa2bf |
parent 4164 | 1654518ef5c4 |
child 4166 | e187f9a19081 |
--- a/vehicle.c Sun Jul 23 08:40:49 2006 +0000 +++ b/vehicle.c Sun Jul 23 17:17:43 2006 +0000 @@ -486,11 +486,9 @@ // Check to see if this is the first if (v == u) return NULL; - do { - if (u->next == v) return u; - } while ( ( u = u->next) != NULL); - - return NULL; + for (; u->next != v; u = u->next) assert(u->next != NULL); + + return u; } /** Finds the first vehicle in a chain.