summaryrefslogtreecommitdiff
path: root/src/lib/libc
diff options
context:
space:
mode:
authordlg <>2025-06-29 00:33:46 +0000
committerdlg <>2025-06-29 00:33:46 +0000
commitba87729fddc1240c1ad88b4d15c02ac77e1dd337 (patch)
treef09debfabcd0674433ce9caff332612512b87edb /src/lib/libc
parentfccd42a0ddbc572e85ac564dc08f0da4315d8275 (diff)
downloadopenbsd-ba87729fddc1240c1ad88b4d15c02ac77e1dd337.tar.gz
openbsd-ba87729fddc1240c1ad88b4d15c02ac77e1dd337.tar.bz2
openbsd-ba87729fddc1240c1ad88b4d15c02ac77e1dd337.zip
make the argument to ether_ntoa const.
this drives me nuts when i want to print something out of what's already const. casting it works, but feels gross. ok guenther@ tb@ deraadt@ enh says this is already in bionic/glibc/musl
Diffstat (limited to 'src/lib/libc')
-rw-r--r--src/lib/libc/net/ether_aton.36
-rw-r--r--src/lib/libc/net/ethers.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libc/net/ether_aton.3 b/src/lib/libc/net/ether_aton.3
index 98562dc44c..83fe98880c 100644
--- a/src/lib/libc/net/ether_aton.3
+++ b/src/lib/libc/net/ether_aton.3
@@ -1,8 +1,8 @@
1.\" $OpenBSD: ether_aton.3,v 1.3 2022/09/11 06:38:10 jmc Exp $ 1.\" $OpenBSD: ether_aton.3,v 1.4 2025/06/29 00:33:46 dlg Exp $
2.\" 2.\"
3.\" Written by roland@frob.com. Public domain. 3.\" Written by roland@frob.com. Public domain.
4.\" 4.\"
5.Dd $Mdocdate: September 11 2022 $ 5.Dd $Mdocdate: June 29 2025 $
6.Dt ETHER_ATON 3 6.Dt ETHER_ATON 3
7.Os 7.Os
8.Sh NAME 8.Sh NAME
@@ -19,7 +19,7 @@
19.In netinet/in.h 19.In netinet/in.h
20.In netinet/if_ether.h 20.In netinet/if_ether.h
21.Ft char * 21.Ft char *
22.Fn ether_ntoa "struct ether_addr *e" 22.Fn ether_ntoa "const struct ether_addr *e"
23.Ft struct ether_addr * 23.Ft struct ether_addr *
24.Fn ether_aton "const char *s" 24.Fn ether_aton "const char *s"
25.Ft int 25.Ft int
diff --git a/src/lib/libc/net/ethers.c b/src/lib/libc/net/ethers.c
index d62be1ca71..6edad5c5e5 100644
--- a/src/lib/libc/net/ethers.c
+++ b/src/lib/libc/net/ethers.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ethers.c,v 1.27 2019/01/25 00:19:25 millert Exp $ */ 1/* $OpenBSD: ethers.c,v 1.28 2025/06/29 00:33:46 dlg Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1998 Todd C. Miller <millert@openbsd.org> 4 * Copyright (c) 1998 Todd C. Miller <millert@openbsd.org>
@@ -42,7 +42,7 @@
42static char * _ether_aton(const char *, struct ether_addr *); 42static char * _ether_aton(const char *, struct ether_addr *);
43 43
44char * 44char *
45ether_ntoa(struct ether_addr *e) 45ether_ntoa(const struct ether_addr *e)
46{ 46{
47 static char a[] = "xx:xx:xx:xx:xx:xx"; 47 static char a[] = "xx:xx:xx:xx:xx:xx";
48 48