From f116c153b9afe64d7d2bf39ab0a91eab6c206192 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 2 Feb 2008 15:35:32 +0000 Subject: [PATCH] Bad errno access in printf statements git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@617 42af7a65-404d-4744-a932-0658087f49c3 --- examples/ostest/posixtimer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/ostest/posixtimer.c b/examples/ostest/posixtimer.c index 87498baa26..84ac25ff2a 100644 --- a/examples/ostest/posixtimer.c +++ b/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 @@ -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 */