From: Jo Sutton Date: Fri, 8 Dec 2023 04:12:06 +0000 (+1300) Subject: s4:libcli: Remove unnecessary uses of discard_const_p() X-Git-Tag: tdb-1.4.11~1793 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76b9c9a8a6609e0d18136c84b68c4a6d6b136ed2;p=thirdparty%2Fsamba.git s4:libcli: Remove unnecessary uses of discard_const_p() Signed-off-by: Jo Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source4/libcli/util/pyerrors.h b/source4/libcli/util/pyerrors.h index 69110ca2732..f5f73b206a1 100644 --- a/source4/libcli/util/pyerrors.h +++ b/source4/libcli/util/pyerrors.h @@ -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"),\