]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
util-ebpf: init code optimization
authorEric Leblond <eric@regit.org>
Sun, 17 Mar 2019 18:45:58 +0000 (19:45 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 18 Jun 2019 05:07:02 +0000 (07:07 +0200)
src/util-ebpf.c

index 38cd17905455a8e70a555f88e6b997a8d818644e..846ecd2ea823ca035124c3c61dd7baa4d616e125 100644 (file)
@@ -181,8 +181,7 @@ static int EBPFLoadPinnedMaps(LiveDevice *livedev, struct ebpf_timeout_config *c
 
     /* First try to load the eBPF check map and return if found */
     if (config->pinned_maps_name) {
-        int ret = -1;
-        ret = EBPFLoadPinnedMapsFile(livedev, config->pinned_maps_name);
+        int ret = EBPFLoadPinnedMapsFile(livedev, config->pinned_maps_name);
         if (ret == 0) {
             /* pinned maps found, let's just exit as XDP filter is in place */
             return ret;