summaryrefslogtreecommitdiffstats
path: root/libexec/rlogind
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-08-20 18:13:50 +0000
committerbrian <brian@FreeBSD.org>2001-08-20 18:13:50 +0000
commit5ba6edf189c79e6f033a79a60979ea33c63f93d8 (patch)
tree720c942c988d2e2288a20599f6f57d466477d489 /libexec/rlogind
parent1a9e5ae59a8ca7b8155cc8fc9de6684d13b93ecb (diff)
downloadFreeBSD-src-5ba6edf189c79e6f033a79a60979ea33c63f93d8.zip
FreeBSD-src-5ba6edf189c79e6f033a79a60979ea33c63f93d8.tar.gz
Handle snprintf() returning < -1.
Diffstat (limited to 'libexec/rlogind')
-rw-r--r--libexec/rlogind/rlogind.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libexec/rlogind/rlogind.c b/libexec/rlogind/rlogind.c
index 2719d09..1dc8252 100644
--- a/libexec/rlogind/rlogind.c
+++ b/libexec/rlogind/rlogind.c
@@ -555,7 +555,7 @@ fatal(f, msg, syserr)
msg, strerror(errno));
else
len = snprintf(bp, sizeof(buf), "rlogind: %s.\r\n", msg);
- if (len == -1)
+ if (len < 0)
len = 0;
(void) write(f, buf, bp + len - buf);
exit(1);
OpenPOWER on IntegriCloud