aboutsummaryrefslogtreecommitdiff
path: root/lib/addrfmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/addrfmt.c')
-rw-r--r--lib/addrfmt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/addrfmt.c b/lib/addrfmt.c
index ff615dd..bd468ef 100644
--- a/lib/addrfmt.c
+++ b/lib/addrfmt.c
@@ -77,7 +77,7 @@ _my_stpcpy (char **pbuf, size_t *psize, const char *src)
}
#define S_UN_NAME(sa, salen) \
- ((salen < offsetof (struct sockaddr_un,sun_path)) ? "" : (sa)->sun_path)
+ ((salen <= offsetof (struct sockaddr_un,sun_path)) ? "" : (sa)->sun_path)
static size_t
format_uint (char **bufptr, size_t *buflen, unsigned n)
@@ -141,7 +141,7 @@ sockaddr_to_str (const struct sockaddr *sa, int salen,
{
struct sockaddr_un *s_un = (struct sockaddr_un *)sa;
if (S_UN_NAME (s_un, salen)[0] == 0)
- len += _my_stpcpy (&bufptr, &buflen, "anonymous socket");
+ len += _my_stpcpy (&bufptr, &buflen, "somebody");
else
{
len += _my_stpcpy (&bufptr, &buflen, "socket ");

Return to:

Send suggestions and report system problems to the System administrator.