Skip to contentSkip to conversation

cleanup: flags should not be bool

PATCH In review Alon Bar-Lev 3 participants 3 messages Mar 25, 2012 – Mar 30, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cleanup: flags should not be bool

Discussed at [1][2][3].

[1] https://bugs.gentoo.org/show_bug.cgi?id=297854#c2
[2] https://297854.bugs.gentoo.org/attachment.cgi?id=214304
[3] http://sourceforge.net/mailarchive/forum.php?thread_name=20120325111517.GI1359%40greenie.muc.de&forum_name=openvpn-devel

---
 src/openvpn/socket.c |    6 +++---
 src/openvpn/socket.h |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
src/openvpn/socket.c +3 -3
index 608213b..6b1f8d2 100644
@@ -2606,7 +2606,7 @@ struct in6_addr add_in6_addr( struct in6_addr base, uint32_t add )
 
 /* set environmental variables for ip/port in *addr */
 void
-setenv_sockaddr (struct env_set *es, const char *name_prefix, const struct openvpn_sockaddr *addr, const bool flags)
+setenv_sockaddr (struct env_set *es, const char *name_prefix, const struct openvpn_sockaddr *addr, const unsigned int flags)
 {
   char name_buf[256];
 
@@ -2643,7 +2643,7 @@ setenv_sockaddr (struct env_set *es, const char *name_prefix, const struct openv
 }
 
 void
-setenv_in_addr_t (struct env_set *es, const char *name_prefix, in_addr_t addr, const bool flags)
+setenv_in_addr_t (struct env_set *es, const char *name_prefix, in_addr_t addr, const unsigned int flags)
 {
   if (addr || !(flags & SA_SET_IF_NONZERO))
     {
@@ -2659,7 +2659,7 @@ void
 setenv_link_socket_actual (struct env_set *es,
 			   const char *name_prefix,
 			   const struct link_socket_actual *act,
-			   const bool flags)
+			   const unsigned int flags)
 {
   setenv_sockaddr (es, name_prefix, &act->dest, flags);
 }
src/openvpn/socket.h +3 -3
index 4a4f75d..ef21cb6 100644
@@ -372,17 +372,17 @@ struct in6_addr add_in6_addr( struct in6_addr base, uint32_t add );
 void setenv_sockaddr (struct env_set *es,
 		      const char *name_prefix,
 		      const struct openvpn_sockaddr *addr,
-		      const bool flags);
+		      const unsigned int flags);
 
 void setenv_in_addr_t (struct env_set *es,
 		       const char *name_prefix,
 		       in_addr_t addr,
-		       const bool flags);
+		       const unsigned int flags);
 
 void setenv_link_socket_actual (struct env_set *es,
 				const char *name_prefix,
 				const struct link_socket_actual *act,
-				const bool flags);
+				const unsigned int flags);
 
 void bad_address_length (int actual, int expected);
 
Signature · 1 line
1.7.3.4
#1 lore raw

Hi,

Quoted 11 lines · Alon Bar-Lev

Discussed at [1][2][3].

[1] https://bugs.gentoo.org/show_bug.cgi?id=297854#c2
[2] https://297854.bugs.gentoo.org/attachment.cgi?id=214304
[3] http://sourceforge.net/mailarchive/forum.php?thread_name=20120325111517.GI1359%40greenie.muc.de&forum_name=openvpn-devel

---
 src/openvpn/socket.c |    6 +++---
 src/openvpn/socket.h |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

ACK!

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#2 lore raw
In reply to Alon Bar-Lev
Quoted 6 lines · Alon Bar-Lev

Discussed at [1][2][3].

[1] https://bugs.gentoo.org/show_bug.cgi?id=297854#c2
[2] https://297854.bugs.gentoo.org/attachment.cgi?id=214304
[3] http://sourceforge.net/mailarchive/forum.php?thread_name=20120325111517.GI1359%40greenie.muc.de&forum_name=openvpn-devel

Quoted 6 lines
---
 src/openvpn/socket.c |    6 +++---
 src/openvpn/socket.h |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

Applied to master branches on -testing and -stable trees.

commit 5cfe3d4c1897785b32565dbb59c914fac62b0ed9

Author: Alon Bar-Lev <[email protected]...>
Date:   Sun Mar 25 13:27:02 2012 +0200
    cleanup: flags should not be bool

    Signed-off-by: Alon Bar-Lev <[email protected]...>
    Acked-by: Gert Doering <[email protected]...>
    Signed-off-by: David Sommerseth <[email protected]...>

kind regards,

David Sommerseth