oslib-posix: Fix compiler warning (-Wclobbered) and simplify the code
authorStefan Weil <sw@weilnetz.de>
Sun, 1 Mar 2015 12:52:06 +0000 (13:52 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 10 Mar 2015 05:15:34 +0000 (08:15 +0300)
commit2a0457bbba10c208358e4e52642abeadd5f10c33
tree82ca2b75a71b4d0ca825eeff2fb83f484daa83a0
parent52b831de0099e627ee3505cb1c0c3d8eeefd3d65
oslib-posix: Fix compiler warning (-Wclobbered) and simplify the code

gcc reports this warning with -Wclobbered:

util/oslib-posix.c: In function ‘os_mem_prealloc’:
util/oslib-posix.c:374:49: error: argument ‘memory’ might be clobbered by
 ‘longjmp’ or ‘vfork’ [-Werror=clobbered]

Fix this and simplify the code by using an existing macro.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
util/oslib-posix.c