From 94218b8ebd628920d9584d54a5017b44220e5798 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 18 Sep 1996 20:51:48 +0000 Subject: loop to clear workspace memory changed to use sizeof rather than hardcoded 4 to be compatible with CPUs with 64-bit ints --- c/src/exec/score/src/wkspace.c | 2 +- cpukit/score/src/wkspace.c | 2 +- 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; } -- cgit v1.2.3