diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2016-12-07 17:24:05 +0100 | 
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2016-12-09 17:36:25 +0100 | 
| commit | 52c6b0e20a94e29126e3ddb180704d9d4c87e14f (patch) | |
| tree | b3b6f93bac172c24c738152991ff22ffbb66c96f /tools/cocci.h | |
| parent | cdc2d7650764bda9b84c3a1c43f26b83fdcb767c (diff) | |
*: fix remaining vty->index & add coccinelle patch
Fix instances that the coccinelle patch didn't catch (or which
coccinelle couldn't parse), and add the patch file for future posterity
(and application to yet-unmerged branches).
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'tools/cocci.h')
| -rw-r--r-- | tools/cocci.h | 34 | 
1 files changed, 34 insertions, 0 deletions
diff --git a/tools/cocci.h b/tools/cocci.h new file mode 100644 index 0000000000..3d877a7b4b --- /dev/null +++ b/tools/cocci.h @@ -0,0 +1,34 @@ +/* some of this stuff doesn't seem to parse properly in coccinelle */ + +#define DEFUN(funcname, cmdname, str, help) \ +  static int funcname \ +    (const struct cmd_element *self, \ +     struct vty *vty, \ +     int argc, \ +     struct cmd_token *argv[]) +#define DEFUN_HIDDEN(funcname, cmdname, str, help) \ +  static int funcname \ +    (const struct cmd_element *self, \ +     struct vty *vty, \ +     int argc, \ +     struct cmd_token *argv[]) + +#define ENABLE_BGP_VNC 1 +#define ALL_LIST_ELEMENTS_RO(list,node,data) \ +  (node) = listhead(list), ((data) = NULL);\ +  (node) != NULL && ((data) = listgetdata(node)); \ +  (node) = listnextnode(node), ((data) = NULL) +#define ALL_LIST_ELEMENTS(list,node,nextnode,data) \ +  (node) = listhead(list), ((data) = NULL); \ +  (node) != NULL && \ +    ((data) = listgetdata(node),(nextnode) = node->next); \ +  (node) = (nextnode), ((data) = NULL) +#define LIST_HEAD(name, type) \ +        struct name { \ +                struct type *lh_first;  /* first element */ \ +        } +#define     LIST_ENTRY(type)                                        \ +struct {                                                            \ +    struct type *le_next;   /* next element */                      \ +    struct type **le_prev;  /* address of previous next element */  \ +}  | 
