Module: xenomai-jki
Branch: for-audis
Commit: 6d830445ae61a8d6fd95eaf5b366e10cfab3f690
URL:    
http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=6d830445ae61a8d6fd95eaf5b366e10cfab3f690

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Fri Aug 30 20:57:24 2013 +0200

testsuite: Fix AuDis testsuite parameter parser

getopt returns an int. So use that type for myPar instead of incorrectly
converting it to char, expecting the latter to be unsigned.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 testsuite/audis/ats/src/c_src/ats_main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/testsuite/audis/ats/src/c_src/ats_main.c 
b/testsuite/audis/ats/src/c_src/ats_main.c
index daf4999..7b314a7 100644
--- a/testsuite/audis/ats/src/c_src/ats_main.c
+++ b/testsuite/audis/ats/src/c_src/ats_main.c
@@ -498,7 +498,7 @@ int showUsage(char *name)
 int main(int argc, char **argv) {
 
         int return_value;
-        char myPar;
+        int myPar;
 
         pthread_t my_own_thread_id;
         uint32_t policy;
@@ -517,7 +517,7 @@ int main(int argc, char **argv) {
 
         while (1) {
                 myPar = getopt(argc, argv, "s:e:t:l:v:d:h:p");
-                if (myPar == 255)
+                if (myPar < 0)
                         break;
                 switch(myPar) {
                 case 't':


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to