summaryrefslogtreecommitdiffstats
path: root/testsuites/smptests/smppsxaffinity02
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-06-13 16:06:20 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-06-13 16:07:47 +0200
commit11947299a0fea7ff73cecdc144d34414a2cc3540 (patch)
treef7315fea04e82aac1d0cc74f5393775a9b8e30c8 /testsuites/smptests/smppsxaffinity02
parentJFFS2: Add device identifier for the flash device (diff)
downloadrtems-11947299a0fea7ff73cecdc144d34414a2cc3540.tar.bz2
smptests: Avoid use of uninitialized data
Diffstat (limited to 'testsuites/smptests/smppsxaffinity02')
-rw-r--r--testsuites/smptests/smppsxaffinity02/init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/testsuites/smptests/smppsxaffinity02/init.c b/testsuites/smptests/smppsxaffinity02/init.c
index ad98da4ec1..9f2190f6ef 100644
--- a/testsuites/smptests/smppsxaffinity02/init.c
+++ b/testsuites/smptests/smppsxaffinity02/init.c
@@ -58,6 +58,7 @@ void Validate_setaffinity_errors(void)
rtems_test_assert( sc == EINVAL );
/* Verify pthread_setaffinity_np checks that at thread id is valid */
+ CPU_ZERO(&cpuset);
CPU_SET(0, &cpuset);
puts( "Init - pthread_setaffinity_np - Invalid thread - ESRCH" );
sc = pthread_setaffinity_np( 999, sizeof(cpu_set_t), &cpuset );
@@ -80,6 +81,7 @@ void Validate_getaffinity_errors(void)
cpu_set_t cpuset;
/* Verify pthread_getaffinity_np checks that at thread id is valid */
+ CPU_ZERO(&cpuset);
CPU_SET(0, &cpuset);
puts( "Init - pthread_getaffinity_np - Invalid thread - ESRCH" );
sc = pthread_getaffinity_np( 999, sizeof(cpu_set_t), &cpuset );