WERROR type variable being incorrectly checked with a NT_STATUS_IS_X
authorDavid Disseldorp <ddiss@samba.org>
Mon, 23 Jan 2012 20:18:01 +0000 (12:18 -0800)
committerJeremy Allison <jra@samba.org>
Mon, 23 Jan 2012 20:18:01 +0000 (12:18 -0800)
type macro.

source3/printing/nt_printing.c
source3/rpc_client/cli_winreg_spoolss.c
source4/lib/registry/tools/regtree.c

index 70346b24edc5a528a1ba6cb864326becb1bdbc8e..7fc55c3098b71372e09a82b3034fbd5c8bb1a6b0 100644 (file)
@@ -746,7 +746,7 @@ static uint32 get_correct_cversion(struct auth_session_info *session_info,
                SMB_VFS_DISCONNECT(conn);
                conn_free(conn);
        }
-       if (!NT_STATUS_IS_OK(*perr)) {
+       if (!W_ERROR_IS_OK(*perr)) {
                cversion = -1;
        }
 
index 2a6a8d1986f6e11f1dee6d9dafd3c44ca0b0024a..a50fcc7ca0e94d9e9f9feedaf8440bbfd974cdb9 100644 (file)
@@ -3647,7 +3647,7 @@ WERROR winreg_get_driver(TALLOC_CTX *mem_ctx,
                result = winreg_enumval_to_dword(info8, v,
                                                 "Version",
                                                 &tmp);
-               if (NT_STATUS_IS_OK(result)) {
+               if (W_ERROR_IS_OK(result)) {
                        info8->version = (enum spoolss_DriverOSVersion) tmp;
                }
                CHECK_ERROR(result);
index 68579406722dcfa7103a92938c8a6d008aea3c99..40570dd778a108842f882d22e41c7c224944a8cf 100644 (file)
@@ -92,7 +92,7 @@ static void print_tree(unsigned int level, struct registry_key *p,
        }
 
        mem_ctx = talloc_init("sec_desc");
-       if (NT_STATUS_IS_ERR(reg_get_sec_desc(mem_ctx, p, &sec_desc))) {
+       if (!W_ERROR_IS_OK(reg_get_sec_desc(mem_ctx, p, &sec_desc))) {
                DEBUG(0, ("Error getting security descriptor\n"));
        }
        talloc_free(mem_ctx);