diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-05 18:42:44 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-05 18:42:44 +0000 |
commit | e1335495d4ae370dd6b02c621ff541db5ac97050 (patch) | |
tree | db5291076d58f830726fd1112b0d1d994f6b02c1 /usr.bin/fstat | |
parent | 179a8d9603fd4591c000095b1f625a5820aee4d8 (diff) |
check kvm_read() better; msaitoh
Diffstat (limited to 'usr.bin/fstat')
-rw-r--r-- | usr.bin/fstat/fstat.c | 6 |
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'; |