aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-02-27 20:40:46 +0100
committerMax Kellermann <max@duempel.org>2013-02-27 20:40:46 +0100
commitfc0ad8674be2dfeef3e8e2fb8311f68da6243631 (patch)
tree1c00c649ef2777673b0e81802a61f2a07b32df07 /src
parent19c67ab72457d68fa35bdad8b4c5ed5ecf04816e (diff)
downloadmpd-fc0ad8674be2dfeef3e8e2fb8311f68da6243631.tar.gz
mpd-fc0ad8674be2dfeef3e8e2fb8311f68da6243631.tar.xz
mpd-fc0ad8674be2dfeef3e8e2fb8311f68da6243631.zip
GlobalEvents: wake up only if the flags were empty
Don't bother checking for the parameter mask. This doesn't matter. The only thing that matters is if a wake-up is already pending.
Diffstat (limited to 'src')
-rw-r--r--src/GlobalEvents.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/GlobalEvents.cxx b/src/GlobalEvents.cxx
index 7c4ffdc16..202df39b6 100644
--- a/src/GlobalEvents.cxx
+++ b/src/GlobalEvents.cxx
@@ -109,6 +109,6 @@ GlobalEvents::Emit(Event event)
assert((unsigned)event < MAX);
const unsigned mask = 1u << unsigned(event);
- if ((GlobalEvents::flags.fetch_or(mask) & mask) == 0)
+ if (GlobalEvents::flags.fetch_or(mask) == 0)
wake_fd.Write();
}