From: José Bollo Date: Wed, 12 Feb 2014 17:01:48 +0000 (+0100) Subject: tests: Correcting exit codes X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=383398f12fb7675aab6577bf542adf06c39f40b2;p=framework%2Fsecurity%2Fsmack.git tests: Correcting exit codes The valid exit code are form 0 to 255. Then using -1 means that the effective exit code will be 0377==255. It isn't accurate. The exit code of 1 is merely very often used for failure status. Signed-off-by: José Bollo --- diff --git a/tests/generator.c b/tests/generator.c index 7571b2e..ac1871c 100644 --- a/tests/generator.c +++ b/tests/generator.c @@ -127,7 +127,7 @@ int pick_subj_label(struct label *labels, int nlab, int max_reoccurance) idx %= nlab; if (repeat > nlab) { fprintf(stderr, "Wrong parameters"); - exit(-1); + exit(1); } } return idx; @@ -151,7 +151,7 @@ int pick_obj_label(struct label *labels, int nlab, int max_reoccurance, int *sub repeat_subj++; if (repeat_subj > nlab) { fprintf(stderr, "Wrong parameters"); - exit(-1); + exit(1); } else repeat = 0; }