From: Michael Tremer Date: Wed, 25 Nov 2020 15:13:08 +0000 (+0000) Subject: network: Do not execute with an error when the excluded result will be empty X-Git-Tag: 0.9.5~18 X-Git-Url: http://git.ipfire.org/?p=location%2Flibloc.git;a=commitdiff_plain;h=abf559267696061a0c9723d8f8e09c9d1aa8fb75 network: Do not execute with an error when the excluded result will be empty Signed-off-by: Michael Tremer --- diff --git a/src/network.c b/src/network.c index 66b460f..9aa802f 100644 --- a/src/network.c +++ b/src/network.c @@ -595,14 +595,16 @@ static int __loc_network_exclude_to_list(struct loc_network* self, if (!loc_network_is_subnet(self, other)) { DEBUG(self->ctx, "Network %p is not contained in network %p\n", other, self); - return 1; + // Exit silently + return 0; } // We cannot perform this operation if both networks equal if (loc_network_cmp(self, other) == 0) { DEBUG(self->ctx, "Networks %p and %p are equal\n", self, other); - return 1; + // Exit silently + return 0; } return __loc_network_exclude(self, other, list);