Attention is currently required from: flichtenheld.

plaisthos has posted comments on this change. ( 
http://gerrit.openvpn.net/c/openvpn/+/1150?usp=email )

Change subject: options: Introduce atoi_constrained and review usages of 
atoi_warn
......................................................................


Patch Set 3: Code-Review-1

(2 comments)

Patchset:

PS3:
I am not sure that the 0 as INT_MAX is the best way to go here. See the comment 
below.


File src/openvpn/options_util.h:

http://gerrit.openvpn.net/c/openvpn/+/1150/comment/8b3298f5_3710adb3 :
PS3, Line 51:  * If \p max is 0, \p INT_MAX is used instead.
Why not use INT_MAX for INT_MAX and instead use this both 0 and INT_MAX are 
INT_MAX?

I think the code would be easier to parse from the calling functions if you 
immediately see that it it is between whatever and INT_MAX.

I think

    atoi_constrained(p[1], &cf_max,  "connect-freq n", 1, INT_MAX, msglevel)

is intuatively more clear than

    atoi_constrained(p[1], &cf_max, "connect-freq n", 1, 0, msglevel)



--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1150?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: Ibc7526d59c1de17a0f9d8ed88f75c6f070ab11e7
Gerrit-Change-Number: 1150
Gerrit-PatchSet: 3
Gerrit-Owner: flichtenheld <fr...@lichtenheld.com>
Gerrit-Reviewer: plaisthos <arne-open...@rfc2549.org>
Gerrit-CC: openvpn-devel <openvpn-devel@lists.sourceforge.net>
Gerrit-Attention: flichtenheld <fr...@lichtenheld.com>
Gerrit-Comment-Date: Tue, 26 Aug 2025 13:01:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to