This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]