]> git.ipfire.org Git - thirdparty/strongswan.git/commit
load-tester: Fix load-tester on platforms where plain `char` is signed
authorTobias Brunner <tobias@strongswan.org>
Fri, 17 Jun 2016 08:22:25 +0000 (10:22 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 17 Jun 2016 08:22:25 +0000 (10:22 +0200)
commit5947d48fb94cfb77b6d49a78d6a56dc875575713
tree01791757dc9d88541d6fb8ec25f82aae46e50942
parent67b9e151fa4497ff6670ba10d007381ed4880690
load-tester: Fix load-tester on platforms where plain `char` is signed

fgetc() returns an int and EOF is usually -1 so when this gets casted to
a char the result depends on whether `char` means `signed char` or
`unsigned char` (the C standard does not specify it).  If it is unsigned
then its value is 0xff so the comparison with EOF will fail as that is an
implicit signed int.
src/libcharon/plugins/load_tester/load_tester.c