From 6bf82a8aa53bc59b6bf1efbe1babf6a9b5022cc2 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 31 Mar 2021 21:55:08 +0200 Subject: [PATCH] fw4.uc: fix family test functions Rewrite the family test functions as arrow functions since ucode HEAD does implicitly return the last function value expression as result anymore for ordinary functions. Signed-off-by: Jo-Philipp Wich --- root/usr/share/ucode/fw4.uc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/root/usr/share/ucode/fw4.uc b/root/usr/share/ucode/fw4.uc index c8396fa..b120ed4 100644 --- a/root/usr/share/ucode/fw4.uc +++ b/root/usr/share/ucode/fw4.uc @@ -253,9 +253,9 @@ function ensure_tcpudp(x) { return false; } -function is_family(x, v) { x.family == 0 || x.family == v } -function family_is_ipv4(x) { x.family == 0 || x.family == 4 } -function family_is_ipv6(x) { x.family == 0 || x.family == 6 } +let is_family = (x, v) => (x.family == 0 || x.family == v); +let family_is_ipv4 = (x) => (x.family == 0 || x.family == 4); +let family_is_ipv6 = (x) => (x.family == 0 || x.family == 6); function infer_family(f, objects) { let res = f; -- 2.30.2