diff options
| author | Michael Osipov <michaelo@FreeBSD.org> | 2025-12-29 21:31:49 +0000 |
|---|---|---|
| committer | Michael Osipov <michaelo@FreeBSD.org> | 2026-01-19 22:13:23 +0000 |
| commit | b016fa60c87f9806e76c2992aae1dedd4a7fedd4 (patch) | |
| tree | 2db1303664a63d5f0fff92e2351521936bffeb2b | |
| parent | fc614b08ef6cce1568f449de1bf562d0b2d5f777 (diff) | |
sockstat: improve printaddr() according to style(9)
Reviewed by: des
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54412
(cherry picked from commit f89f7e58ba1d54c6a683e3cc899938895496c088)
| -rw-r--r-- | usr.bin/sockstat/sockstat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c index d024c983a84b..fed63d6031f3 100644 --- a/usr.bin/sockstat/sockstat.c +++ b/usr.bin/sockstat/sockstat.c @@ -853,7 +853,7 @@ static int printaddr(struct sockaddr_storage *ss) { struct sockaddr_un *sun; - char addrstr[NI_MAXHOST] = { '\0', '\0' }; + char addrstr[NI_MAXHOST] = ""; int error, off, port = 0; switch (ss->ss_family) { @@ -879,9 +879,9 @@ printaddr(struct sockaddr_storage *ss) errx(1, "getnameinfo()"); } if (port == 0) - return xprintf("%s:*", addrstr); + return (xprintf("%s:*", addrstr)); else - return xprintf("%s:%d", addrstr, port); + return (xprintf("%s:%d", addrstr, port)); } static const char * |
