diff options
author | Stefan Metzmacher <metze@samba.org> | 2016-09-12 15:12:24 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2016-10-26 11:20:18 +0200 |
commit | 47b40ac96afbd4fb28e519b9658256ecaa304e71 (patch) | |
tree | 5b0eaafbe4c9174f7767c0d62182ae8c0132b816 /pidl/lib/Parse | |
parent | d4660e869790c7da1cb97e9d95a995e5a32b34ef (diff) | |
download | samba-47b40ac96afbd4fb28e519b9658256ecaa304e71.tar.gz |
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>
Diffstat (limited to 'pidl/lib/Parse')
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/Python.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index b2b8720493b..fabdca7b1bf 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/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;"); |