Trivial optimization
* strace.c (cleanup): Read 'interrupted' volatile variable only once. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
b51581e8f0
commit
3521884c91
7
strace.c
7
strace.c
@ -1974,7 +1974,12 @@ cleanup(void)
|
||||
{
|
||||
int i;
|
||||
struct tcb *tcp;
|
||||
int fatal_sig = interrupted ? interrupted : SIGTERM;
|
||||
int fatal_sig;
|
||||
|
||||
/* 'interrupted' is a volatile object, fetch it only once */
|
||||
fatal_sig = interrupted;
|
||||
if (!fatal_sig)
|
||||
fatal_sig = SIGTERM;
|
||||
|
||||
for (i = 0; i < tcbtabsize; i++) {
|
||||
tcp = tcbtab[i];
|
||||
|
Loading…
Reference in New Issue
Block a user