]> git.ipfire.org Git - pakfire.git/commitdiff
Silence another compiler warning about the turn value
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 8 Jun 2019 14:48:10 +0000 (15:48 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 8 Jun 2019 14:48:10 +0000 (15:48 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/_pakfire/pakfire.c

index fffbc7851ba713903eaed097e465878162876074..349d8995fed6c09fb90b4ada764ba8a3505cf05e 100644 (file)
@@ -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) {