1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

s4:libcli: Remove unnecessary uses of discard_const_p()

Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Jo Sutton 2023-12-08 17:12:06 +13:00 committed by Andrew Bartlett
parent e8497f1343
commit 76b9c9a8a6

View File

@ -20,13 +20,13 @@
#ifndef __PYERRORS_H__
#define __PYERRORS_H__
#define PyErr_FromWERROR(err) Py_BuildValue("(k,s)", (unsigned long)(W_ERROR_V(err)), discard_const_p(char, win_errstr(err)))
#define PyErr_FromWERROR(err) Py_BuildValue("(k,s)", (unsigned long)(W_ERROR_V(err)), win_errstr(err))
#define PyErr_FromHRESULT(err) Py_BuildValue("(k,s)", (unsigned long)(HRES_ERROR_V(err)), discard_const_p(char, hresult_errstr_const(err)))
#define PyErr_FromHRESULT(err) Py_BuildValue("(k,s)", (unsigned long)(HRES_ERROR_V(err)), hresult_errstr_const(err))
#define PyErr_FromNTSTATUS(status) Py_BuildValue("(k,s)", (unsigned long)(NT_STATUS_V(status)), discard_const_p(char, get_friendly_nt_error_msg(status)))
#define PyErr_FromNTSTATUS(status) Py_BuildValue("(k,s)", (unsigned long)(NT_STATUS_V(status)), get_friendly_nt_error_msg(status))
#define PyErr_FromString(str) Py_BuildValue("(s)", discard_const_p(char, str))
#define PyErr_FromString(str) Py_BuildValue("(s)", str)
#define PyErr_SetWERROR(werr) \
PyErr_SetObject(PyObject_GetAttrString(PyImport_ImportModule("samba"),\