werror: replace WERR_BADFUNC with WERR_INVALID_FUNCTION in source4/lib/wmi/
authorGünther Deschner <gd@samba.org>
Thu, 3 Dec 2015 14:24:10 +0000 (15:24 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 27 Sep 2016 22:04:16 +0000 (00:04 +0200)
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/lib/wmi/tools/wmic.c
source4/lib/wmi/wbemdata.c

index bbfe5ed3341a1c7c582baa40724ec7ce41cf2b28..3921fd8bdb1dba21470d4d793e6e0cf6d6da03b3 100644 (file)
@@ -186,8 +186,8 @@ int main(int argc, char **argv)
                struct WbemClassObject *co[cnt];
 
                result = IEnumWbemClassObject_SmartNext(pEnum, ctx, 0xFFFFFFFF, cnt, co, &ret);
-               /* WERR_BADFUNC is OK, it means only that there is less returned objects than requested */
-               if (!W_ERROR_EQUAL(result, WERR_BADFUNC)) {
+               /* WERR_INVALID_FUNCTION is OK, it means only that there is less returned objects than requested */
+               if (!W_ERROR_EQUAL(result, WERR_INVALID_FUNCTION)) {
                        WERR_CHECK("Retrieve result data.");
                } else {
                        DEBUG(1, ("OK   : Retrieved less objects than requested (it is normal).\n"));
index 57e4022e7c613175fb24759b0ffa7601001b7c61..6ee790cec424f046a15c6af67c4ffd1a9d975628 100644 (file)
@@ -376,7 +376,7 @@ WERROR IEnumWbemClassObject_SmartNext(struct IEnumWbemClassObject *d, TALLOC_CTX
        }
 
        result = IWbemWCOSmartEnum_Next(ecod->pSE, loc_ctx, &ecod->guid, lTimeout, uCount, puReturned, &size, &data);
-       if (!W_ERROR_EQUAL(result, WERR_BADFUNC)) {
+       if (!W_ERROR_EQUAL(result, WERR_INVALID_FUNCTION)) {
                WERR_CHECK("IWbemWCOSmartEnum_Next.");
        }