Re: [AD] Allegro 5 new config routines, alpha 2 |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2002-02-07, Angelo Mottola <a.mottola@xxxxxxxxxx> wrote:
> /* Avoid collisions (if any) */
> while ((strcmp(entry->name, name)) && (entry->next))
> entry = entry->next;
> if (strcmp(entry->name, name))
> return NULL;
Just quickly, there seems to be lots of these. strcmp'ing might be
unnecessarily called twice.
while (entry && strcmp(entry->name, name))
entry = entry->next;
if (!entry)
return NULL;
.. or something like that might be better.