diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-02-02 15:35:32 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-02-02 15:35:32 +0000 |
commit | 71ca4e5df09be9d95d77ef49d90573ed8942e0d6 (patch) | |
tree | 2f901884e80dbf9857dd930309bc457225e227cc /nuttx/examples | |
parent | 2ce27097bd692980027f29e6b616561b912e7e94 (diff) | |
download | px4-nuttx-71ca4e5df09be9d95d77ef49d90573ed8942e0d6.tar.gz px4-nuttx-71ca4e5df09be9d95d77ef49d90573ed8942e0d6.tar.bz2 px4-nuttx-71ca4e5df09be9d95d77ef49d90573ed8942e0d6.zip |
Bad errno access in printf statements
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@617 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples')
-rw-r--r-- | nuttx/examples/ostest/posixtimer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nuttx/examples/ostest/posixtimer.c b/nuttx/examples/ostest/posixtimer.c index 87498baa2..84ac25ff2 100644 --- a/nuttx/examples/ostest/posixtimer.c +++ b/nuttx/examples/ostest/posixtimer.c @@ -1,5 +1,5 @@ /*********************************************************************** - * posixtimer.c + * examples/ostest/posixtimer.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> @@ -201,7 +201,7 @@ void timer_test(void) status = timer_create(CLOCK_REALTIME, ¬ify, &timerid); if (status != OK) { - printf("timer_test: timer_create failed, errno=%d\n", get_errno_ptr()); + printf("timer_test: timer_create failed, errno=%d\n", errno); goto errorout; } @@ -217,7 +217,7 @@ void timer_test(void) status = timer_settime(timerid, 0, &timer, NULL); if (status != OK) { - printf("timer_test: timer_settime failed, errno=%d\n", get_errno_ptr()); + printf("timer_test: timer_settime failed, errno=%d\n", errno); goto errorout; } @@ -230,7 +230,7 @@ void timer_test(void) status = sem_wait(&sem); if (status != 0) { - int error = *get_errno_ptr(); + int error = errno; if (error == EINTR) { printf("timer_test: sem_wait() successfully interrupted by signal\n" ); @@ -256,7 +256,7 @@ errorout: status = timer_delete(timerid); if (status != OK) { - printf("timer_test: timer_create failed, errno=%d\n", get_errno_ptr()); + printf("timer_test: timer_create failed, errno=%d\n", errno); } /* Detach the signal handler */ |