FreeBSD 14 clang complains about this:
init.c:3530:13: warning: use of bitwise '|' with boolean operands
[-Wbitwise-instead-of-logical]
platform_group_get(c->options.groupname,
&c0->platform_state_group)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
init.c:3530:13: note: cast one or both operands to int to silence this
warning
1 warning generated.
.. so do what it wants us to do.
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Antonio Quartulli <a@unstable.cc>
Message-Id: <
20221004145142.19091-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25333.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
/* get user and/or group that we want to setuid/setgid to */
c0->uid_gid_specified =
platform_group_get(c->options.groupname, &c0->platform_state_group)
- |platform_user_get(c->options.username, &c0->platform_state_user);
+ || platform_user_get(c->options.username, &c0->platform_state_user);
/* perform postponed chdir if --daemon */
if (c->did_we_daemonize && c->options.cd_dir == NULL)