I'm very pleased to announce the release of our new website and documentation using the new toolchain with Hugo and AsciiDoctor. To get more information about the new toolchain please read the FreeBSD Documentation Project Primer[1], Hugo docs[2] and AsciiDoctor docs[3]. Acknowledgment: Benedict Reuschling <bcr@> Glen Barber <gjb@> Hiroki Sato <hrs@> Li-Wen Hsu <lwhsu@> Sean Chittenden <seanc@> The FreeBSD Foundation [1] https://docs.FreeBSD.org/en/books/fdp-primer/ [2] https://gohugo.io/documentation/ [3] https://docs.asciidoctor.org/home/ Approved by: doceng, core
43 lines
987 B
Diff
43 lines
987 B
Diff
--- lib/libc/net/linkaddr.c.orig
|
|
+++ lib/libc/net/linkaddr.c
|
|
@@ -125,7 +125,7 @@
|
|
static char obuf[64];
|
|
_Static_assert(sizeof(obuf) >= IFNAMSIZ + 20, "obuf is too small");
|
|
char *out;
|
|
- const char *in, *inlim;
|
|
+ const u_char *in, *inlim;
|
|
int namelen, i, rem;
|
|
|
|
namelen = (sdl->sdl_nlen <= IFNAMSIZ) ? sdl->sdl_nlen : IFNAMSIZ;
|
|
@@ -142,11 +142,11 @@
|
|
}
|
|
}
|
|
|
|
- in = (const char *)sdl->sdl_data + sdl->sdl_nlen;
|
|
+ in = (const u_char *)sdl->sdl_data + sdl->sdl_nlen;
|
|
inlim = in + sdl->sdl_alen;
|
|
|
|
while (in < inlim && rem > 1) {
|
|
- if (in != (const char *)sdl->sdl_data + sdl->sdl_nlen) {
|
|
+ if (in != (const u_char *)sdl->sdl_data + sdl->sdl_nlen) {
|
|
*out++ = '.';
|
|
rem--;
|
|
}
|
|
@@ -154,15 +154,14 @@
|
|
if (i > 0xf) {
|
|
if (rem < 3)
|
|
break;
|
|
+ *out++ = hexlist[i >> 4];
|
|
*out++ = hexlist[i & 0xf];
|
|
- i >>= 4;
|
|
- *out++ = hexlist[i];
|
|
rem -= 2;
|
|
} else {
|
|
if (rem < 2)
|
|
break;
|
|
*out++ = hexlist[i];
|
|
- rem++;
|
|
+ rem--;
|
|
}
|
|
}
|
|
*out = 0;
|