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)
commitfa6b0cefbb3d52ebbc0fa5bf7b3b84001a5a3f32
tree52da053c397637a9b1ce34a36b8ff895ee79b43e
parent5ec53b92b35fc0d3d3047e7f61f7f3e7b6b19d94
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>
src/ptgen.c