]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/hook.c
lib: make yang_dnode_get_entry() more flexible
[mirror_frr.git] / lib / hook.c
index 1468c4d3291f15ca00769d0eaab2eb7fb6a6ee91..4fe305f282681009ec462869e75968e6af31fd47 100644 (file)
  * DEALINGS IN THE SOFTWARE.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "memory.h"
 #include "hook.h"
 
@@ -38,9 +42,8 @@ void _hook_register(struct hook *hook, void *funcptr, void *arg, bool has_arg,
        he->priority = priority;
 
        for (pos = &hook->entries; *pos; pos = &(*pos)->next)
-               if (hook->reverse
-                   ? (*pos)->priority < priority
-                   : (*pos)->priority >= priority)
+               if (hook->reverse ? (*pos)->priority < priority
+                                 : (*pos)->priority >= priority)
                        break;
 
        he->next = *pos;