From: "cron2 (Code Review)" Date: Sat, 24 May 2025 14:14:08 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., antonio@...2726... Message-ID: <0046e185200475ca98671ff12a9639846b2ed5d0-EmailReviewComments-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="dpcVpZsrIZA="; charset=UTF-8 Subject: [Openvpn-devel] [XL] Change in openvpn[master]: Reformat the whole project with clang-format List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld Cc: plaisthos , openvpn-devel --dpcVpZsrIZA= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, ordex, plaisthos. cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/ope= nvpn/+/791?usp=3Demail ) Change subject: Reformat the whole project with clang-format ...................................................................... Patch Set 18: (5 comments) Patchset: PS18: Overall this is impressively good. Some changes (struct opening bracket) s= hould have been done all along :-) - others just make sense. I have a few = that I do not like and I think one actual bug in the ruleset (`do...while()= ` in buffer.c). File src/openvpn/buffer.c: http://gerrit.openvpn.net/c/openvpn/+/791/comment/e228108e_a877cddf : PS18, Line 850: } while (c); it should not do that http://gerrit.openvpn.net/c/openvpn/+/791/comment/450ac52e_57fa1b4a : PS18, Line 915: && c !=3D 127)) /* allow ascii non-control and = UTF-8, consider DEL to be a control */ this is ugly, but I guess the best way to fix it is to manually move the co= mment before the if() line File src/openvpn/comp.h: http://gerrit.openvpn.net/c/openvpn/+/791/comment/07c11cf5_a35c47d6 : PS18, Line 93: bool check_compression_settings_valid(struct compress_option= s *info, int msglevel); this is one of the changes I'm not sure we want - having the return type on= the line before gives us more line length for the actual prototype, and al= so it eases "grep ^function" to find prototype + function implementation (m= y use case, which I could certainly solve differently) File src/openvpn/console_builtin.c: http://gerrit.openvpn.net/c/openvpn/+/791/comment/ecc1640a_115b4d7b : PS18, Line 74: msg(M_WARN | M_ERRNO, "get_console_input_win32(): un= expected error"); the extra spaces around `foo|bar` are not really to my liking ("this belong= s together" vibes) -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/791?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I2566ad493629e1f5fdfa6f6483b8973463404e3e Gerrit-Change-Number: 791 Gerrit-PatchSet: 18 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: cron2 Gerrit-CC: openvpn-devel Gerrit-CC: ordex Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-Attention: ordex Gerrit-Comment-Date: Sat, 24 May 2025 14:14:08 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment --dpcVpZsrIZA= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, ordex, plaisthos. <= /p>

View C= hange

5 comments:

    =
  • Patchset:

    • Patch Set #18:

      Overall this is impressively good. Some changes= (struct opening bracket) should have been done all along :-) - others just= make sense. I have a few that I do not like and I think one actual bug in= the ruleset (`do...while()` in buffer.c).

  • File src/openvpn/buffer.c:

    • Patch Set #18, Line 850: } while (c);

      it should not do that

    • Patch Set #18, Line 915: && c !=3D 127)) /* allow ascii non-contro= l and UTF-8, consider DEL to be a control */

      this is ugly, but I guess the best w= ay to fix it is to manually move the comment before the if() line

    • <= /ul>
    • File src/openvpn/comp.h:

      • Patch Set #18, Line = 93: bool check_compress= ion_settings_valid(struct compress_options *info, int msglevel);

        =

        this is one of t= he changes I'm not sure we want - having the return type on the line be= fore gives us more line length for the actual prototype, and also it eases = "grep ^function" to find prototype + function implementation (my = use case, which I could certainly solve differently)

    • File src/openvpn/console_builtin.c:

      =
      • Patch Set #18, Line 74= : msg(M_WARN | = M_ERRNO, "get_console_input_win32(): unexpected error");

        the extra spac= es around `foo|bar` are not really to my liking ("this belongs togethe= r" vibes)

    To view, visit change 791. To unsubscri= be, or for help writing mail filters, visit settings.

    Gerrit-Project: openvpn
    Gerrit-Branch: master
    Gerrit-Change-Id: I2566ad493629e1f5fdfa6f6483b= 8973463404e3e
    Gerrit-Change-Number: 791
    Gerrit-PatchSet: 18
    Gerrit-Owner: flichtenheld <frank@...2723...= .>
    Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
    Gerrit-CC: cron2 <gert@...1296...>
    Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
    Gerrit-CC: ordex <antonio@...2726...>
    Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
    Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
    Gerrit-Attention: ordex <antonio@...2726...= >
    Gerrit-Comment-Date: Sat, 24 May 2025 14:14:08= +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment
    --dpcVpZsrIZA=--