X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Flist.c;h=a236f8c73bfaf4232c9331dd46ab216f3f6f23ca;hb=94e0c3ff3c096456bddfe33ac8d6540be17bfe8e;hp=b5fa3893aa4c1df1c76a0030f1d8907f8b1bf063;hpb=dc1539ae02fcb9c22b98d587b790ce8bc3a68774;p=sliver-openvswitch.git diff --git a/lib/list.c b/lib/list.c index b5fa3893a..a236f8c73 100644 --- a/lib/list.c +++ b/lib/list.c @@ -90,7 +90,11 @@ list_replace(struct list *element, const struct list *position) } /* Adjusts pointers around 'list' to compensate for 'list' having been moved - * around in memory (e.g. as a consequence of realloc()). */ + * around in memory (e.g. as a consequence of realloc()). + * + * This always works if 'list' is a member of a list, or if 'list' is the head + * of a non-empty list. It fails badly, however, if 'list' is the head of an + * empty list; just use list_init() in that case. */ void list_moved(struct list *list) {