insque: fix segfault on (prev == NULL)
commitf9ae36ebf1d8e300c77dfd16b55514ea5a96751f
authorBartosz Golaszewski <bartekgola@gmail.com>
Tue, 18 Jun 2013 21:02:20 +0000 (18 23:02 +0200)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Thu, 4 Jul 2013 09:25:17 +0000 (4 11:25 +0200)
treeb4d5a83f7536adfcdd73ea2fedd26dc6377121ca
parent23691332c8458adb469ad78051493ef0db434222
insque: fix segfault on (prev == NULL)

Since version 2.5 glibc allows prev to be a NULL pointer in insque, whereas
uClibc segfaults in this case. This fixes the issue and makes insque
initialize q_forw and q_back with NULLs if prev == NULL.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
libc/misc/search/insremque.c