From 1d5c6e41dce8fc38c3d864de147ca29a8ac45a78 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Fri, 30 Aug 2024 20:37:44 +0200 Subject: [PATCH] Remove redundant nil nftResult handling This is already caught and handled before the switch logic and would hence never be reached here. Signed-off-by: Georg Pfuetzenreuter --- nftables-http-api.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/nftables-http-api.go b/nftables-http-api.go index cc50618..1a10acc 100644 --- a/nftables-http-api.go +++ b/nftables-http-api.go @@ -133,8 +133,6 @@ func handleSetRoute(w http.ResponseWriter, r *http.Request) { doReturn(w, http.StatusOK, "already exists") case "added": doReturn(w, http.StatusCreated, "ok") - case nil: - doReturn(w, http.StatusInternalServerError, "failure") default: doReturn(w, http.StatusInternalServerError, "unhandled result") }