Skip to content

Commit de42814

Browse files
committed
cg: cleanup code
1 parent 74746c6 commit de42814

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

bld/cg/c/temps.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
*
33
* Open Watcom Project
44
*
5-
* Copyright (c) 2002-2025 The Open Watcom Contributors. All Rights Reserved.
5+
* Copyright (c) 2002-2026 The Open Watcom Contributors. All Rights Reserved.
66
* Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
77
*
88
* ========================================================================
@@ -74,12 +74,12 @@ static void StackEntry( stack_temp *st_temp, name *temp )
7474
stack_entry *new_stk;
7575

7676
new_stk = CGAlloc( sizeof( stack_entry ) );
77-
new_stk->link = StackMap;
7877
new_stk->size = temp->n.size;
7978
new_stk->location = temp->t.location;
8079
new_stk->temp.first = st_temp->first;
8180
new_stk->temp.last = st_temp->last;
8281
new_stk->temp.others = NULL;
82+
new_stk->link = StackMap;
8383
StackMap = new_stk;
8484
}
8585

@@ -595,7 +595,7 @@ static void AssgnATemp( name *temp, block_id blk_id )
595595
void FiniStackMap( void )
596596
/**************************/
597597
{
598-
stack_entry *next1;
598+
stack_entry *stack;
599599
stack_temp *other;
600600
stack_temp *next2;
601601
name *temp;
@@ -610,13 +610,13 @@ void FiniStackMap( void )
610610
AllocNewLocal( temp );
611611
}
612612

613-
for( ; StackMap != NULL; StackMap = next1 ) {
614-
next1 = StackMap->link;
615-
for( other = StackMap->temp.others; other != NULL; other = next2 ) {
613+
while( (stack = StackMap) != NULL ) {
614+
StackMap = StackMap->link;
615+
for( other = stack->temp.others; other != NULL; other = next2 ) {
616616
next2 = other->others;
617617
CGFree( other );
618618
}
619-
CGFree( StackMap );
619+
CGFree( stack );
620620
}
621621
TellTempLocs();
622622
}

bld/cg/intel/386/h/offset.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
*
33
* Open Watcom Project
44
*
5-
* Copyright (c) 2023 The Open Watcom Contributors. All Rights Reserved.
5+
* Copyright (c) 2023-2026 The Open Watcom Contributors. All Rights Reserved.
66
* Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
77
*
88
* ========================================================================
@@ -32,7 +32,9 @@
3232

3333
#ifndef OFFSET_H
3434
#define OFFSET_H
35+
3536
typedef uint_16 short_offset;
3637
typedef uint_32 long_offset;
3738
typedef uint_32 offset;
39+
3840
#endif

0 commit comments

Comments
 (0)