aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-09-24 21:41:38 -0700
committerGuy Harris <guy@alum.mit.edu>2017-09-25 04:42:30 +0000
commit1cbb04eaf15508df8b1aa5b38b5abb4613e827c1 (patch)
tree4203735232eba096dfab5ae0eb23a84364cdd272 /tools
parente3acb2e3ebfadddec77dd7c2cd72db83fe5de91c (diff)
pidl:Python: make use of NDR_ERR_CODE_IS_SUCCESS()
Pick up change from Samba: commit 47b40ac96afbd4fb28e519b9658256ecaa304e71 Author: Stefan Metzmacher <metze@samba.org> Date: Mon Sep 12 15:12:24 2016 +0200 pidl:Python: make use of NDR_ERR_CODE_IS_SUCCESS() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Change-Id: I550b83596fe27bad5ba4f7d91eb0ac62380f4eac Reviewed-on: https://code.wireshark.org/review/23708 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tools')
-rw-r--r--tools/pidl/lib/Parse/Pidl/Samba4/Python.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/pidl/lib/Parse/Pidl/Samba4/Python.pm b/tools/pidl/lib/Parse/Pidl/Samba4/Python.pm
index b2b8720493..fabdca7b1b 100644
--- a/tools/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/tools/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -280,7 +280,7 @@ sub PythonStruct($$$$$$)
$self->deindent;
$self->pidl("}");
$self->pidl("err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_$name);");
- $self->pidl("if (err != NDR_ERR_SUCCESS) {");
+ $self->pidl("if (!NDR_ERR_CODE_IS_SUCCESS(err)) {");
$self->indent;
$self->pidl("TALLOC_FREE(tmp_ctx);");
$self->pidl("PyErr_SetNdrError(err);");
@@ -333,7 +333,7 @@ sub PythonStruct($$$$$$)
$self->pidl("err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_$name);");
$self->deindent;
$self->pidl("}");
- $self->pidl("if (err != NDR_ERR_SUCCESS) {");
+ $self->pidl("if (!NDR_ERR_CODE_IS_SUCCESS(err)) {");
$self->indent;
$self->pidl("PyErr_SetNdrError(err);");
$self->pidl("return NULL;");