summaryrefslogtreecommitdiff
path: root/tests/12-sim-basic_masked_ops.c
diff options
context:
space:
mode:
authorPaul Moore <pmoore@redhat.com>2014-04-23 18:34:49 -0400
committerPaul Moore <pmoore@redhat.com>2014-05-01 14:15:49 -0400
commit42badbc70fc93b622b9aa2dba74f434d0334a870 (patch)
tree50886e643d3da9a73b67939d9a61845f2d5fbd45 /tests/12-sim-basic_masked_ops.c
parent0fa292323f4b214a0c2f17206f183719fe382215 (diff)
downloadlibseccomp-42badbc70fc93b622b9aa2dba74f434d0334a870.tar.gz
tests: correctly return an error if seccomp_init() fails
Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'tests/12-sim-basic_masked_ops.c')
-rw-r--r--tests/12-sim-basic_masked_ops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/12-sim-basic_masked_ops.c b/tests/12-sim-basic_masked_ops.c
index 29b86d6..5c699f3 100644
--- a/tests/12-sim-basic_masked_ops.c
+++ b/tests/12-sim-basic_masked_ops.c
@@ -19,6 +19,7 @@
* along with this library; if not, see <http://www.gnu.org/licenses>.
*/
+#include <errno.h>
#include <unistd.h>
#include <seccomp.h>
@@ -37,7 +38,7 @@ int main(int argc, char *argv[])
ctx = seccomp_init(SCMP_ACT_KILL);
if (ctx == NULL)
- goto out;
+ return ENOMEM;
/* the syscall and argument numbers are all fake to make the test
* simpler */