mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Search'n'replace remaining NULL occurrences (#816)
This commit is contained in:
@@ -206,12 +206,12 @@ class CPyRetBool {
|
||||
PyObject* WriteBytes(PyObject* data) {
|
||||
if (!PyBytes_Check(data)) {
|
||||
PyErr_SetString(PyExc_TypeError, "socket.WriteBytes needs bytes as argument");
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
char* buffer;
|
||||
Py_ssize_t length;
|
||||
if (-1 == PyBytes_AsStringAndSize(data, &buffer, &length)) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
if ($self->Write(buffer, length)) {
|
||||
Py_RETURN_TRUE;
|
||||
|
||||
Reference in New Issue
Block a user