From: Michael Tremer Date: Sat, 8 Jun 2019 14:48:10 +0000 (+0100) Subject: Silence another compiler warning about the turn value X-Git-Tag: 0.9.28~1285^2~967 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34c0706d6b5bdd36f69ab909f257d0220538f263;p=pakfire.git Silence another compiler warning about the turn value Signed-off-by: Michael Tremer --- diff --git a/src/_pakfire/pakfire.c b/src/_pakfire/pakfire.c index fffbc7851..349d8995f 100644 --- a/src/_pakfire/pakfire.c +++ b/src/_pakfire/pakfire.c @@ -48,11 +48,13 @@ static int Pakfire_init(PakfireObject* self, PyObject* args, PyObject* kwds) { if (!PyArg_ParseTuple(args, "s|s", &path, &arch)) return -1; + // Create a new Pakfire instance self->pakfire = pakfire_create(path, arch); - if (!self->pakfire) - return -1; - return 0; + if (self->pakfire) + return 0; + else + return -1; } static void Pakfire_dealloc(PakfireObject* self) {