]> git.ipfire.org Git - location/libloc.git/commitdiff
python: Cleanup the switch statement
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Jun 2025 13:39:45 +0000 (13:39 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Jun 2025 13:39:45 +0000 (13:39 +0000)
No functional changes.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/python/database.c

index c0d426498632cea1c00887883f17b77674970d2f..203bb3964eaed4a089a81fbf21647823f6e6d869 100644 (file)
@@ -213,10 +213,11 @@ static PyObject* Database_lookup(DatabaseObject* self, PyObject* args) {
                switch (errno) {
                        case EINVAL:
                                PyErr_Format(PyExc_ValueError, "Invalid IP address: %s", address);
-                               return NULL;
+                               break;
 
                        default:
                                PyErr_SetFromErrno(PyExc_OSError);
+                               break;
                }
 
                return NULL;