summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/sigproc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r--winsup/cygwin/sigproc.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index fbc738d4f..6a7708f0c 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -402,16 +402,11 @@ sig_clear (int sig)
void
pending_signals::clear (_cygtls *tls)
{
- sigpacket *q = &start, *qnext;
+ sigpacket *q, *qnext;
- while ((qnext = q->next))
- {
- if (qnext->sigtls == tls)
- {
- q->next = qnext->next;
- qnext->si.si_signo = 0;
- }
- }
+ for (q = &start; (qnext = q->next); q->next = qnext->next)
+ if (qnext->sigtls == tls)
+ qnext->si.si_signo = 0;
}
/* Clear pending signals of specific thread. Called from _cygtls::remove */