On Thu, 22 Nov 2018, Tom de Vries wrote: > Hi, > > If realloc is called with size 0, realloc can return NULL.
Note that, as of C17, realloc with size 0 is marked as an obsolescent feature (because of inconsistencies between implementations regarding whether the old object is deallocated). So it would be advisable for code intended to be portable to avoid calling realloc with size 0 at all. -- Joseph S. Myers jos...@codesourcery.com