list: LIST_INSERT_BEFORE: update head if necessary (#4261)
authorMichael Olbrich <m.olbrich@pengutronix.de>
Tue, 4 Oct 2016 14:15:37 +0000 (16:15 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 4 Oct 2016 14:15:37 +0000 (16:15 +0200)
commit5076f4219ee3f25a39e3520943270c2c915b03d1
tree62dd523177ad99e013bfa407bf56584dd915607b
parentc080fbce9ca4ac21d8dbb1c2d0e8c9205edfdbfb
list: LIST_INSERT_BEFORE: update head if necessary (#4261)

If the new item is inserted before the first item in the list, then the
head must be updated as well.
Add a test to the list unit test to check for this.
src/basic/list.h
src/test/test-list.c