From ee7071e6d7d93f10d38f4eb8c9a4c0ca8984c2d0 Mon Sep 17 00:00:00 2001
From: Florian Westphal <fw@strlen.de>
Date: Mon, 2 Jul 2018 18:06:11 +0200
Subject: [PATCH] ebtablesd: avoid build warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
ebtablesd.c:55:43: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Phil Sutter <psutter@redhat.com>
---
ebtablesd.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/ebtablesd.c b/ebtablesd.c
index 062a2d6b5afa3..02d51fa115456 100644
--- a/ebtablesd.c
+++ b/ebtablesd.c
@@ -52,7 +52,7 @@ int main(int argc_, char *argv_[])
char *argv[EBTD_ARGC_MAX], *args[4], name[] = "mkdir",
mkdir_option[] = "-p", mkdir_dir[] = EBTD_PIPE_DIR,
cmdline[EBTD_CMDLINE_MAXLN];
- int readfd, base = 0, offset = 0, n = 0, ret = 0, quotemode = 0;
+ int readfd, base = 0, offset = 0, n = 0, quotemode = 0;
/* Make sure the pipe directory exists */
args[0] = name;
@@ -74,19 +74,16 @@ int main(int argc_, char *argv_[])
if (mkfifo(EBTD_PIPE, 0600) < 0 && errno != EEXIST) {
printf("Error creating FIFO " EBTD_PIPE "\n");
- ret = -1;
goto do_exit;
}
if ((readfd = open(EBTD_PIPE, O_RDONLY | O_NONBLOCK, 0)) == -1) {
perror("open");
- ret = -1;
goto do_exit;
}
if (signal(SIGPIPE, sigpipe_handler) == SIG_ERR) {
perror("signal");
- ret = -1;
goto do_exit;
}
--
2.21.0