[rtems commit] Some minor fix on psxhdrs

Joel Sherrill joel at rtems.org
Fri Dec 14 16:28:55 UTC 2018


Module:    rtems
Branch:    master
Commit:    4bd2f802a93a5724c99fed9caafcbae9ccf41ac0
Changeset: http://git.rtems.org/rtems/commit/?id=4bd2f802a93a5724c99fed9caafcbae9ccf41ac0

Author:    Himanshu40 <himanshuwindows8.1 at gmail.com>
Date:      Fri Dec 14 01:11:11 2018 +0530

Some minor fix on psxhdrs

---

 testsuites/psxtests/psxhdrs/semaphore/sem_open.c | 5 +----
 testsuites/psxtests/psxhdrs/strings/bcopy.c      | 5 +----
 testsuites/psxtests/psxhdrs/strings/index.c      | 6 +-----
 testsuites/psxtests/psxhdrs/strings/rindex.c     | 6 +-----
 4 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/testsuites/psxtests/psxhdrs/semaphore/sem_open.c b/testsuites/psxtests/psxhdrs/semaphore/sem_open.c
index dbf72fc..52d1ad8 100644
--- a/testsuites/psxtests/psxhdrs/semaphore/sem_open.c
+++ b/testsuites/psxtests/psxhdrs/semaphore/sem_open.c
@@ -40,8 +40,6 @@
 
 int test( void );
 
-int result = 1;
-
 int test( void )
 {
   sem_t *sem1;
@@ -51,7 +49,6 @@ int test( void )
   value = 1;
 
   sem1 = sem_open( "sem", oflag, 0777, value );
-  (void) sem1;
 
-  return result;
+  return ( sem1 != NULL );
 }
diff --git a/testsuites/psxtests/psxhdrs/strings/bcopy.c b/testsuites/psxtests/psxhdrs/strings/bcopy.c
index 8f7f31d..26cca2f 100644
--- a/testsuites/psxtests/psxhdrs/strings/bcopy.c
+++ b/testsuites/psxtests/psxhdrs/strings/bcopy.c
@@ -38,15 +38,12 @@
 
 int test( void );
 
-int result = 1;
-
 int test( void )
 {
   auto char buffer[50];
 
   bcopy( "Hello ", buffer, 6 );
   bcopy( "world", &buffer[6], 6 );
-  result = 0;
 
-  return result;
+  return 0;
 }
diff --git a/testsuites/psxtests/psxhdrs/strings/index.c b/testsuites/psxtests/psxhdrs/strings/index.c
index 557a977..ea8ebf0 100644
--- a/testsuites/psxtests/psxhdrs/strings/index.c
+++ b/testsuites/psxtests/psxhdrs/strings/index.c
@@ -38,16 +38,12 @@
 
 int test( void );
 
-int result = 1;
-
 int test( void )
 {
   char *p;
   char *string = "This is a string for testing";
 
   p = index( string, 'i' );
-  (void) p;
-  result = 0;
 
-  return result;
+  return ( p != NULL );
 }
diff --git a/testsuites/psxtests/psxhdrs/strings/rindex.c b/testsuites/psxtests/psxhdrs/strings/rindex.c
index e8e5394..aea3efb 100644
--- a/testsuites/psxtests/psxhdrs/strings/rindex.c
+++ b/testsuites/psxtests/psxhdrs/strings/rindex.c
@@ -38,16 +38,12 @@
 
 int test( void );
 
-int result = 1;
-
 int test( void )
 {
   char *p;
   char *string = "This is a string for testing";
 
   p = rindex( string, 'i' );
-  (void) p;
-  result = 0;
 
-  return result;
+  return ( p != NULL );
 }




More information about the vc mailing list