From: gdt Date: Mon, 22 Dec 2003 16:07:52 +0000 (+0000) Subject: comments about struct list X-Git-Tag: frr-2.0-rc1~3835 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a7a9990f48d7e45463b0c50986805973956fdb4c;p=matthieu%2Ffrr.git comments about struct list --- diff --git a/lib/linklist.h b/lib/linklist.h index ace6dee399..331135fe14 100644 --- a/lib/linklist.h +++ b/lib/linklist.h @@ -36,7 +36,12 @@ struct list { struct listnode *head; struct listnode *tail; + /* invariant: count is the number of listnodes in the list */ unsigned int count; + /* + * Returns -1 if val1 < val2, 0 if equal?, 1 if val1 > val2. + * Used as definition of sorted for listnode_add_sort + */ int (*cmp) (void *val1, void *val2); void (*del) (void *val); };