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:
Denys Vlasenko 2012-01-29 21:17:56 +01:00
parent b51581e8f0
commit 3521884c91

View File

@ -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];