[quagga-dev 6426] If IS_DEBUG_OSPF_EVENT... efectivity?

Tomas fidler tomas.fidler at tiscali.cz
Wed Feb 18 20:15:31 GMT 2009

I'm new to quagga-dev group list so sory if this question is stupid ...
Why there is in ospf implementation, in file ospf_spf.c, often somethins
similar to this:

      if (w_lsa == null)
          if (IS_DEBUG_OSPF_EVENT)
             zlog_debug ("ospf.....");///only some debugging

This is for example in procedure ospf_spf_next 

I think that debugging is not so often turned on that it should be
tested as second.... isnt this more efective? :
(i think it is even more readabile)
      if (IS_DEBUG_OSPF_EVENT && w_lsa == null) ///or something similar
             zlog_debug ("ospf.....");

Thanks for any answer.

    Tomas Fidler

More information about the Quagga-dev mailing list