From: Eric Leblond Date: Sun, 17 Mar 2019 18:45:58 +0000 (+0100) Subject: util-ebpf: init code optimization X-Git-Tag: suricata-5.0.0-rc1~343 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=140269a6be1bb1180fe930bfe09af12368ce1130;p=thirdparty%2Fsuricata.git util-ebpf: init code optimization --- diff --git a/src/util-ebpf.c b/src/util-ebpf.c index 38cd179054..846ecd2ea8 100644 --- a/src/util-ebpf.c +++ b/src/util-ebpf.c @@ -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;