diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2015-03-20 10:50:13 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2015-03-24 08:16:35 -0500 |
commit | 73a2caf46b229dc51dff89b83860fcf42515c38e (patch) | |
tree | b955e32df9494483785de12ae07305d8c924ebc6 /testsuites/sptests/spwatchdog | |
parent | sptests/spedfsched02: Reduce stack space usage to fix on smaller targets (diff) | |
download | rtems-73a2caf46b229dc51dff89b83860fcf42515c38e.tar.bz2 |
sptests/spwatchdog/init.c: Avoid integer overflow
Diffstat (limited to 'testsuites/sptests/spwatchdog')
-rw-r--r-- | testsuites/sptests/spwatchdog/init.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/testsuites/sptests/spwatchdog/init.c b/testsuites/sptests/spwatchdog/init.c index 8e329a4f2b..1d3cb2f9dd 100644 --- a/testsuites/sptests/spwatchdog/init.c +++ b/testsuites/sptests/spwatchdog/init.c @@ -36,9 +36,15 @@ static void test_watchdog_routine( Objects_Id id, void *arg ) static void test_watchdog_static_init( void ) { + #if defined(RTEMS_USE_16_BIT_OBJECT) + #define JUNK_ID 0x1234 + #else + #define JUNK_ID 0x12345678 + #endif + static Watchdog_Control a = WATCHDOG_INITIALIZER( test_watchdog_routine, - 0x12345678, + JUNK_ID, (void *) 0xdeadbeef ); Watchdog_Control b; @@ -47,7 +53,7 @@ static void test_watchdog_static_init( void ) _Watchdog_Initialize( &b, test_watchdog_routine, - 0x12345678, + JUNK_ID, (void *) 0xdeadbeef ); |