s3:pylibsmb: improve return types (false => NULL)
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 27 May 2021 03:39:19 +0000 (15:39 +1200)
committerJeremy Allison <jra@samba.org>
Thu, 10 Jun 2021 00:29:32 +0000 (00:29 +0000)
NULL, a.k.a. (void *)false;

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/pylibsmb.c

index 38dc5ecb8dfd76aff2bafff07146e9cda049e994..b498d3a0f62a3db458c523101e9cf1fb94d6c981 100644 (file)
@@ -1757,7 +1757,7 @@ static PyObject *py_smb_get_sd(struct py_cli_state *self, PyObject *args)
        req = cli_query_security_descriptor_send(
                NULL, self->ev, self->cli, fnum, sinfo);
        if (!py_tevent_req_wait_exc(self, req)) {
-               return false;
+               return NULL;
        }
        status = cli_query_security_descriptor_recv(req, NULL, &sd);
        PyErr_NTSTATUS_NOT_OK_RAISE(status);
@@ -1790,7 +1790,7 @@ static PyObject *py_smb_set_sd(struct py_cli_state *self, PyObject *args)
        req = cli_set_security_descriptor_send(
                NULL, self->ev, self->cli, fnum, sinfo, sd);
        if (!py_tevent_req_wait_exc(self, req)) {
-               return false;
+               return NULL;
        }
 
        status = cli_set_security_descriptor_recv(req);