cron2 has uploaded a new patch set (#2) to the change originally created by
its_Giaan. ( http://gerrit.openvpn.net/c/openvpn/+/875?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by cron2
Change subject: Fix PASS_BY_VALUE issue in options_postprocess_mutate_le()
......................................................................
Fix PASS_BY_VALUE issue in options_postprocess_mutate_le()
Fix issue reported by Coverity:
CID 1641424: Performance inefficiencies (PASS_BY_VALUE)
Passing parameter ce of type "struct connection_entry"
(size 208 bytes) by value, which exceeds the low
threshold of 128 bytes.
Commit 8466c2ca unintentionally introduced a performance
penalty due to passing struct connection_entry 'ce'
by value to options_postprocess_mutate_le().
fix this by passing 'ce' by address.
Change-Id: I0542df021ae0ba9c982335fed7bbd10ed326dd0f
Signed-off-by: Gianmarco De Gregori <[email protected]>
Acked-by: Gert Doering <[email protected]>
Message-Id: <[email protected]>
URL:
https://www.mail-archive.com/[email protected]/msg30566.html
Signed-off-by: Gert Doering <[email protected]>
---
M src/openvpn/options.c
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/75/875/2
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index c938999..bd5c056 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -3323,12 +3323,12 @@
}
static void
-options_postprocess_mutate_le(struct connection_entry ce, struct local_entry
*le)
+options_postprocess_mutate_le(struct connection_entry *ce, struct local_entry
*le)
{
/* use the global port if none is specified */
if (!le->port)
{
- le->port = ce.local_port;
+ le->port = ce->local_port;
}
}
@@ -3777,7 +3777,7 @@
{
for (i = 0; i < o->ce.local_list->len; i++)
{
- options_postprocess_mutate_le(o->ce, o->ce.local_list->array[i]);
+ options_postprocess_mutate_le(&o->ce, o->ce.local_list->array[i]);
}
}
else
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/875?usp=email
To unsubscribe, or for help writing mail filters, visit
http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I0542df021ae0ba9c982335fed7bbd10ed326dd0f
Gerrit-Change-Number: 875
Gerrit-PatchSet: 2
Gerrit-Owner: its_Giaan <[email protected]>
Gerrit-Reviewer: cron2 <[email protected]>
Gerrit-Reviewer: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel