aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pidl/lib/Parse/Pidl/Samba4/Python.pm
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pidl/lib/Parse/Pidl/Samba4/Python.pm')
-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 b2b8720..fabdca7 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;");