ptgen: work around gcc miscompilation
authorJonas Gorski <jonas.gorski@gmail.com>
Mon, 12 Sep 2016 10:59:21 +0000 (12:59 +0200)
committerJonas Gorski <jonas.gorski@gmail.com>
Mon, 26 Sep 2016 10:23:41 +0000 (12:23 +0200)
commit997fed94e328315c6055331dbd8d6d4b56d1b454
treef0405afd37120567a6dc546ca8c4ddd45557690d
parent175fbe4d4ec4978ff1341f24ce3811d673c91a85
ptgen: work around gcc miscompilation

Some gcc versions seem to miscompile code using ternary operators,
work around this by just returning the result if exp is 0.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
tools/firmware-utils/src/ptgen.c