| Don't try to resolve '-' into IP address. |
| |
| diff -ru --exclude-from freebsd-src-diff-exclude-names /var/archive3/public/freebsd-releng-10.4-src/usr.bin/w/w.c freebsd-10.4/usr.bin/w/w.c |
| --- /var/archive3/public/freebsd-releng-10.4-src/usr.bin/w/w.c 2017-09-29 08:21:22.000000000 +0800 |
| +++ freebsd-10.4/usr.bin/w/w.c 2020-01-10 21:28:37.425887000 +0800 |
| @@ -366,7 +366,7 @@ |
| if (isaddr && realhostname_sa(fn, sizeof(fn), sa, |
| sa->sa_len) == HOSTNAME_FOUND) |
| p = fn; |
| - } else if (!isaddr) { |
| + } else if (*ep->utmp.ut_host && !isaddr) { |
| /* |
| * If a host has only one A/AAAA RR, change a |
| * name into an IP address |