chiark / gitweb /
util: fix multiply-alloc helpers with size==0
authorDavid Herrmann <dh.herrmann@gmail.com>
Fri, 13 Jun 2014 16:38:15 +0000 (18:38 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Mon, 16 Jun 2014 13:22:57 +0000 (15:22 +0200)
commit368504f485d09b9fd48b7538e71981f648eb32bb
tree212099b3f05d91408cdeba2c42261bf4e073b8da
parentd442e2ec6e896c312bc616be7607332d978a45c9
util: fix multiply-alloc helpers with size==0

Passing 0 to malloc() is not required to return NULL. Therefore, don't
bail out if "b" is 0. This is not of importance to the existing helpers,
but the upcoming realloc_multiply() requires this. To keep consistence, we
keep the same behavior for the other helpers.
src/shared/util.h