summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-09-18 20:51:48 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-09-18 20:51:48 +0000
commit94218b8ebd628920d9584d54a5017b44220e5798 (patch)
treef5fa473ec7d95e45d941fac4a91ecd97fc888359
parentcorrected prototype of _Objects_Get_next (diff)
downloadrtems-94218b8ebd628920d9584d54a5017b44220e5798.tar.bz2
loop to clear workspace memory changed to use sizeof rather than
hardcoded 4 to be compatible with CPUs with 64-bit ints
-rw-r--r--c/src/exec/score/src/wkspace.c2
-rw-r--r--cpukit/score/src/wkspace.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/c/src/exec/score/src/wkspace.c b/c/src/exec/score/src/wkspace.c
index 1dda9408bb..dd8865da52 100644
--- a/c/src/exec/score/src/wkspace.c
+++ b/c/src/exec/score/src/wkspace.c
@@ -43,7 +43,7 @@ void _Workspace_Handler_initialization(
if ( _CPU_Table.do_zero_of_workspace ) {
for( zero_out_array = (unsigned32 *) starting_address, index = 0 ;
- index < size / 4 ;
+ index < size / sizeof( unsigned32 ) ;
index++ )
zero_out_array[ index ] = 0;
}
diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c
index 1dda9408bb..dd8865da52 100644
--- a/cpukit/score/src/wkspace.c
+++ b/cpukit/score/src/wkspace.c
@@ -43,7 +43,7 @@ void _Workspace_Handler_initialization(
if ( _CPU_Table.do_zero_of_workspace ) {
for( zero_out_array = (unsigned32 *) starting_address, index = 0 ;
- index < size / 4 ;
+ index < size / sizeof( unsigned32 ) ;
index++ )
zero_out_array[ index ] = 0;
}