This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: coding style tweaks
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Jim Blandy <jimb at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Mon, 13 May 2002 20:31:02 -0400 (EDT)
- Subject: Re: RFA: coding style tweaks
> }
>
> /* It's not us. Try all our children, and return the lowest. */
> {
> struct macro_source_file *child;
> ! struct macro_source_file *best = NULL;
> ! int best_depth = 0;
>
> for (child = source->includes; child; child = child->next_included)
> {
This has to be wrong.
If you initialize best_depth to be 0, unless result_depth is somehow < 0,
it'll never be the new best.
--Dan