aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2026-04-18 13:18:15 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2026-04-18 13:18:15 +0000
commitf0b1462f922c3af4af870d5e8e0c7502b94bc7fb (patch)
treed3e6a1dcded8b844071c35a7fddd168aae1d3231 /src
parentb8afece8d141369c25027b73680deccf48ddb948 (diff)
downloadskalibs-f0b1462f922c3af4af870d5e8e0c7502b94bc7fb.tar.gz
Make ip46_from_ip? macros not force an int return
The int return was useless and caused warnings. Since we're major bumping, use the opportunity to fix that.
Diffstat (limited to 'src')
-rw-r--r--src/headers/ip46-with4
-rw-r--r--src/headers/ip46-without4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/headers/ip46-with b/src/headers/ip46-with
index f6e0ed1..024ee54 100644
--- a/src/headers/ip46-with
+++ b/src/headers/ip46-with
@@ -7,8 +7,8 @@ typedef ip46full ip46, *ip46_ref ;
#define ip46_fmt(s, i) ip46full_fmt(s, i)
#define ip46_scan(s, i) ip46full_scan(s, i)
#define ip46_scanlist(out, max, s, num) ip46full_scanlist(out, max, s, num)
-#define ip46_from_ip4(i, ip4) (ip46full_from_ip4(i, ip4), 1)
-#define ip46_from_ip6(i, ip6) (ip46full_from_ip6(i, ip6), 1)
+#define ip46_from_ip4(i, ip4) ip46full_from_ip4(i, ip4)
+#define ip46_from_ip6(i, ip6) ip46full_from_ip6(i, ip6)
#define socket_connect46(s, i, port) ((i)->is6 ? socket_connect6(s, (i)->ip, port) : socket_connect4(s, (i)->ip, port))
#define socket_bind46(s, i, port) ((i)->is6 ? socket_bind6(s, (i)->ip, port) : socket_bind4(s, (i)->ip, port))
diff --git a/src/headers/ip46-without b/src/headers/ip46-without
index 58fe022..0f1c35e 100644
--- a/src/headers/ip46-without
+++ b/src/headers/ip46-without
@@ -11,8 +11,8 @@ struct ip46_s
#define ip46_fmt(s, i) ip4_fmt(s, (i)->ip)
#define ip46_scan(s, i) ip4_scan(s, (i)->ip)
#define ip46_scanlist(out, max, s, num) ip4_scanlist((out)->ip, max, s, num)
-#define ip46_from_ip4(i, ip4) (memmove((i)->ip, (ip4), 4), 1)
-#define ip46_from_ip6(i, ip6) (errno = ENOSYS, 0)
+#define ip46_from_ip4(i, ip4) memmove((i)->ip, (ip4), 4)
+#define ip46_from_ip6(i, ip6) (errno = ENOSYS)
#define socket_connect46(s, i, port) socket_connect4(s, (i)->ip, port)
#define socket_bind46(s, i, port) socket_bind4(s, (i)->ip, port)