[Hye-Shik Chang] > Thanks for the explanation. But listobject isn't using realloc To the contrary, listobject uses realloc() a lot, but that doesn't matter here. empty_ob_item has to be a unique pointer value so that the later if (self->ob_item != empty_ob_item || self->ob_size) { /* The user mucked with the list during the sort. */ error check is robust. The C standard doesn't promise much about malloc(0), but it does promise that pointers returned by distinct malloc(0) calls are non-equal so long as none have been passed to free(). In contrast, all NULL pointers must compare equal. If empty_ob_item were NULL, and user code (e.g.) added something to the list during sorting, then managed to NULL it out again, the error check about couldn't catch that. In any case, the patch you're talking about was simply reverting a change I made by mistake, and the restored code has been there forever. Ain't broke, don't fix <wink>.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4