From: Douglas Bagnall Date: Fri, 20 Apr 2018 12:37:15 +0000 (+1200) Subject: py_net: fix != None check X-Git-Tag: ldb-1.6.1~240 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3da801aea1a67606f25480ac7cd43eee77e003c8;p=thirdparty%2Fsamba.git py_net: fix != None check Py_None is not false in C, so this branch was always taken. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c index b50f7abfb96..05afe3b9c48 100644 --- a/source4/libnet/py_net.c +++ b/source4/libnet/py_net.c @@ -550,7 +550,7 @@ static PyObject *py_net_replicate_chunk(py_net_Object *self, PyObject *args, PyO s->chunk.req5 = NULL; s->chunk.req8 = NULL; s->chunk.req10 = NULL; - if (py_req) { + if (py_req != Py_None) { switch (req_level) { case 0: break;