This patch gets rid of the below message while performing a code
analysis with cppcheck.

[sheep/sheep.c:197] -> [sheep/sheep.c:201]: (performance) Variable 'fd'
is reassigned a value before the old one has been used.

Signed-off-by: Ruoyu <lian...@ucweb.com>
---
 sheep/sheep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sheep/sheep.c b/sheep/sheep.c
index a36da17..328a7fe 100644
--- a/sheep/sheep.c
+++ b/sheep/sheep.c
@@ -194,7 +194,7 @@ static void sdlog_help(void)
 
 static int create_pidfile(const char *filename)
 {
-       int fd = -1;
+       int fd;
        int len;
        char buffer[128];
 
-- 
1.8.3.2


-- 
sheepdog mailing list
sheepdog@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to