Gert Doering has uploaded a new patch set (#2) to the change originally created 
by Răzvan Cojocaru. ( https://gerrit.openvpn.net/c/openvpn/+/2238?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by Frank Lichtenheld


Change subject: manage: drop redundant NULL checks
......................................................................

manage: drop redundant NULL checks

man_need() already guarantees p[1] for log and echo, and
up_query_type is non-NULL once "needed" holds in
man_query_password_base64().

Change-Id: I58b88ca3934e52cfc5140a564c9ed7260857ce80
Signed-off-by: Razvan Cojocaru <[email protected]>
Acked-by: Frank Lichtenheld <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2238
Message-Id: <[email protected]>
URL: 
https://www.mail-archive.com/[email protected]/msg41822.html
Signed-off-by: Gert Doering <[email protected]>
---
M src/openvpn/manage.c
1 file changed, 3 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/38/2238/2

diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c
index 112db4a..d63d53b 100644
--- a/src/openvpn/manage.c
+++ b/src/openvpn/manage.c
@@ -1051,7 +1051,7 @@
         msg(M_CLIENT, "ERROR: no password is currently needed at this time");
         return;
     }
-    if (!man->connection.up_query_type || 
!streq(man->connection.up_query_type, type))
+    if (!streq(man->connection.up_query_type, type))
     {
         msg(M_CLIENT, "ERROR: password of type '%s' entered, but we need one 
of type '%s'",
             type, man->connection.up_query_type);
@@ -1665,10 +1665,7 @@
     {
         if (man_need(p, 1, MN_AT_LEAST))
         {
-            if (p[1])
-            {
-                man_log(man, p[1]);
-            }
+            man_log(man, p[1]);
             if (p[2])
             {
                 man_log(man, p[2]);
@@ -1679,10 +1676,7 @@
     {
         if (man_need(p, 1, MN_AT_LEAST))
         {
-            if (p[1])
-            {
-                man_echo(man, p[1]);
-            }
+            man_echo(man, p[1]);
             if (p[2])
             {
                 man_echo(man, p[2]);

--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2238?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I58b88ca3934e52cfc5140a564c9ed7260857ce80
Gerrit-Change-Number: 2238
Gerrit-PatchSet: 2
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Frank Lichtenheld <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to