From: Razvan Cojocaru <[email protected]>

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
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2238
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Frank Lichtenheld <[email protected]>

        
diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c
index 86c498e..d5b1ff8 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);
@@ -1684,10 +1684,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]);
@@ -1698,10 +1695,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]);


_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to