small order of operations fix

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42368 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alexander von Gluck IV 2011-07-04 03:10:32 +00:00
parent 002d5e9729
commit 4c330e8cfd

View File

@ -512,7 +512,7 @@ status_t
Volume::AddNodeListener(NodeListener *listener, Node *node, uint32 flags) Volume::AddNodeListener(NodeListener *listener, Node *node, uint32 flags)
{ {
// check parameters // check parameters
if (!listener || !node && !(flags & NODE_LISTEN_ANY_NODE) if (!listener || (!node && !(flags & NODE_LISTEN_ANY_NODE))
|| !(flags & NODE_LISTEN_ALL)) { || !(flags & NODE_LISTEN_ALL)) {
return B_BAD_VALUE; return B_BAD_VALUE;
} }
@ -624,7 +624,7 @@ status_t
Volume::AddEntryListener(EntryListener *listener, Entry *entry, uint32 flags) Volume::AddEntryListener(EntryListener *listener, Entry *entry, uint32 flags)
{ {
// check parameters // check parameters
if (!listener || !entry && !(flags & ENTRY_LISTEN_ANY_ENTRY) if (!listener || (!entry && !(flags & ENTRY_LISTEN_ANY_ENTRY))
|| !(flags & ENTRY_LISTEN_ALL)) { || !(flags & ENTRY_LISTEN_ALL)) {
return B_BAD_VALUE; return B_BAD_VALUE;
} }