[Openvpn-devel] Remove unused variable line

Message ID 20230430172202.206528-1-arne@rfc2549.org
State Accepted
Headers show
Series [Openvpn-devel] Remove unused variable line | expand

Commit Message

Arne Schwabe April 30, 2023, 5:22 p.m. UTC
The newer compilers started to complain about this.

Change-Id: I784def4d941b7d21c7979f84f8681719c9ff7a53
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
---
 src/openvpn/pool.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Gert Doering May 2, 2023, 2:27 p.m. UTC | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

Trivial enough.  Looks like a leftover from The Great Pool Rewrite for 2.5

Test compiled on Linux.

Your patch has been applied to the master and release/2.6 branch.

commit f9d0994584cd8f42c013db3e8ea2d6ab3e3d7c62 (master)
commit 6f72df316daed5e8f7a1b4b432265e01954dbac3 (release/2.6)
Author: Arne Schwabe
Date:   Sun Apr 30 19:22:02 2023 +0200

     Remove unused variable line

     Signed-off-by: Arne Schwabe <arne@rfc2549.org>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20230430172202.206528-1-arne@rfc2549.org>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26612.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/pool.c b/src/openvpn/pool.c
index f899b95d2..4af9bcb10 100644
--- a/src/openvpn/pool.c
+++ b/src/openvpn/pool.c
@@ -608,7 +608,6 @@  ifconfig_pool_read(struct ifconfig_pool_persist *persist, struct ifconfig_pool *
         struct gc_arena gc = gc_new();
         struct buffer in = alloc_buf_gc(256, &gc);
         char *cn_buf, *ip_buf, *ip6_buf;
-        int line = 0;
 
         ALLOC_ARRAY_CLEAR_GC(cn_buf, char, buf_size, &gc);
         ALLOC_ARRAY_CLEAR_GC(ip_buf, char, buf_size, &gc);
@@ -621,7 +620,6 @@  ifconfig_pool_read(struct ifconfig_pool_persist *persist, struct ifconfig_pool *
             {
                 break;
             }
-            ++line;
             if (!BLEN(&in))
             {
                 continue;