From 83da7dde2a08b3bf48c5beb1295a4d364aeba3b0 Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Thu, 28 Dec 2006 02:41:34 +0000 Subject: [PATCH] ole32: ROTFLAGS_REGISTRATIONKEEPSALIVE and ROTFLAGS_ALLOWANYCLIENT are legal to be used together in RunningObjectTable_Register. --- dlls/ole32/moniker.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/dlls/ole32/moniker.c b/dlls/ole32/moniker.c index 080b936b5f8..6a263041b94 100644 --- a/dlls/ole32/moniker.c +++ b/dlls/ole32/moniker.c @@ -282,15 +282,9 @@ RunningObjectTableImpl_Register(IRunningObjectTable* iface, DWORD grfFlags, TRACE("(%p,%d,%p,%p,%p)\n",This,grfFlags,punkObject,pmkObjectName,pdwRegister); - /* - * there's only two types of register : strong and or weak registration - * (only one must be passed on parameter) - */ - if ( ( (grfFlags & ROTFLAGS_REGISTRATIONKEEPSALIVE) || !(grfFlags & ROTFLAGS_ALLOWANYCLIENT)) && - (!(grfFlags & ROTFLAGS_REGISTRATIONKEEPSALIVE) || (grfFlags & ROTFLAGS_ALLOWANYCLIENT)) && - (grfFlags) ) + if (grfFlags & ~(ROTFLAGS_REGISTRATIONKEEPSALIVE|ROTFLAGS_ALLOWANYCLIENT)) { - ERR("Invalid combination of ROTFLAGS: %x\n", grfFlags); + ERR("Invalid grfFlags: 0x%08x\n", grfFlags & ~(ROTFLAGS_REGISTRATIONKEEPSALIVE|ROTFLAGS_ALLOWANYCLIENT)); return E_INVALIDARG; }