Attention is currently required from: Arne Schwabe.
Hello Arne Schwabe,
I'd like you to do a code review.
Please visit
https://gerrit.openvpn.net/c/openvpn/+/2238?usp=email
to review the following change.
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]>
---
M src/openvpn/manage.c
1 file changed, 3 insertions(+), 9 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/38/2238/1
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]);
--
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: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I58b88ca3934e52cfc5140a564c9ed7260857ce80
Gerrit-Change-Number: 2238
Gerrit-PatchSet: 1
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel