| Don't try to resolve '-' into IP address. |
| |
| diff -ru --exclude-from freebsd-src-diff-exclude-names /usr/src/usr.bin/w/w.c freebsd-11.1/usr.bin/w/w.c |
| --- /usr/src/usr.bin/w/w.c 2017-07-21 07:43:22.000000000 +0800 |
| +++ freebsd-11.1/usr.bin/w/w.c 2020-01-26 13:52:22.223538000 +0800 |
| @@ -383,7 +383,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 |