testsuite: Fix checking __sysno
authorLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 9 Apr 2013 14:54:05 +0000 (11:54 -0300)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 9 Apr 2013 14:54:05 +0000 (11:54 -0300)
commit8e00db9537fee379d900b352b4f6750c52d17726
treef07773fcc330e3ff3d0110788be01c62ad18a5c3
parent0ae58609dc0b983aa17ea7aa38c071cf1830819a
testsuite: Fix checking __sysno

Use an if instead of a case statemente. If __NR_finit_module is not
defined in system headers we define it to -1, causing a "duplicate case
value" error. Yet, we don't want to actually call our finit_module()
function if -1 is passed.

This also fix errno being set with negative value.
testsuite/init_module.c