summaryrefslogtreecommitdiff
path: root/usr.bin/fstat
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-07-05 18:42:44 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-07-05 18:42:44 +0000
commite1335495d4ae370dd6b02c621ff541db5ac97050 (patch)
treedb5291076d58f830726fd1112b0d1d994f6b02c1 /usr.bin/fstat
parent179a8d9603fd4591c000095b1f625a5820aee4d8 (diff)
check kvm_read() better; msaitoh
Diffstat (limited to 'usr.bin/fstat')
-rw-r--r--usr.bin/fstat/fstat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c
index 6026b922594..508b9b109c3 100644
--- a/usr.bin/fstat/fstat.c
+++ b/usr.bin/fstat/fstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fstat.c,v 1.14 1998/06/25 06:21:34 deraadt Exp $ */
+/* $OpenBSD: fstat.c,v 1.15 1998/07/05 18:42:41 deraadt Exp $ */
/*-
* Copyright (c) 1988, 1993
@@ -41,7 +41,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)fstat.c 8.1 (Berkeley) 6/6/93";*/
-static char *rcsid = "$OpenBSD: fstat.c,v 1.14 1998/06/25 06:21:34 deraadt Exp $";
+static char *rcsid = "$OpenBSD: fstat.c,v 1.15 1998/07/05 18:42:41 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -659,7 +659,7 @@ socktrans(sock, i)
}
if ((len = kvm_read(kd, (u_long)dom.dom_name, dname,
- sizeof(dname) - 1)) < 0) {
+ sizeof(dname) - 1)) != sizeof(dname) -1) {
dprintf(stderr, "can't read domain name at %p\n",
dom.dom_name);
dname[0] = '\0';