Skip to contentSkip to conversation

use 'static inline' instead of 'inline static'

PATCH In review Antonio Quartulli 3 participants 3 messages Jan 17, 2022 – Jan 18, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 use 'static inline' instead of 'inline static'

There are 2 occurrences where the order 'inline static' is used when defining a function, while the rest of the code uses the definitely more common form 'static inline'.

Convert those 2 occurrences to the common format.

---
 src/openvpn/buffer.h | 2 +-
 src/openvpn/proto.h  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
src/openvpn/buffer.h +1 -1
index 8017130f..d2dbb64b 100644
@@ -198,7 +198,7 @@ bool buf_init_debug(struct buffer *buf, int offset, const char *file, int line);
 
 
 /* inline functions */
-inline static void
+static inline void
 gc_freeaddrinfo_callback(void *addr)
 {
     freeaddrinfo((struct addrinfo *) addr);
src/openvpn/proto.h +1 -1
index 94010a98..0062951d 100644
@@ -251,7 +251,7 @@ struct ip_tcp_udp_hdr {
  * This returns an ip protocol version of packet inside tun
  * and offset of IP header (via parameter).
  */
-inline static int
+static inline int
 get_tun_ip_ver(int tunnel_type, struct buffer *buf, int *ip_hdr_offset)
 {
     int ip_ver = -1;
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw

Makes sense.

ma 17. tammik. 2022 klo 11.36 Antonio Quartulli ([email protected]...) kirjoitti:

Quoted 49 lines

There are 2 occurrences where the order 'inline static' is used when defining a function, while the rest of the code uses the definitely more common form 'static inline'.

Convert those 2 occurrences to the common format.

---
 src/openvpn/buffer.h | 2 +-
 src/openvpn/proto.h  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
src/openvpn/buffer.h +1 -1
index 8017130f..d2dbb64b 100644
@@ -198,7 +198,7 @@ bool buf_init_debug(struct buffer *buf, int offset, const char *file, int line);
 
 
 /* inline functions */
-inline static void
+static inline void
 gc_freeaddrinfo_callback(void *addr)
 {
     freeaddrinfo((struct addrinfo *) addr);
src/openvpn/proto.h +1 -2
index 94010a98..0062951d 100644
@@ -251,7 +251,7 @@ struct ip_tcp_udp_hdr {
  * This returns an ip protocol version of packet inside tun
  * and offset of IP header (via parameter).
  */
-inline static int
+static inline int
 get_tun_ip_ver(int tunnel_type, struct buffer *buf, int *ip_hdr_offset)
 {
     int ip_ver = -1;
--

2.34.1

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Signature · 1 line
-Lev
#2 lore raw
In reply to Antonio Quartulli

Looks good. Not tested beyond a simple compile test.

Your patch has been applied to the master branch.

commit 943fb256ded24e8637a2bbaabd525e4b85ecc810

Author: Antonio Quartulli
Date:   Mon Jan 17 10:35:08 2022 +0100
     use 'static inline' instead of 'inline static'

     Signed-off-by: Antonio Quartulli <[email protected]...>
     Acked-by: Lev Stipakov <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg23554.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering