aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/gcore/aoutcore.c
diff options
context:
space:
mode:
authorJohn Polstra <jdp@FreeBSD.org>1999-07-17 19:03:20 +0000
committerJohn Polstra <jdp@FreeBSD.org>1999-07-17 19:03:20 +0000
commitcaf4d16aef1997ec6b12fab9d2c3e679f8dd586f (patch)
tree93cb0ef471311f23cfa66d3134431743f49c0ed4 /usr.bin/gcore/aoutcore.c
parent2062f4ee1124f4a0b02c7ea30ffd9615f7dcc6c8 (diff)
Notes
Diffstat (limited to 'usr.bin/gcore/aoutcore.c')
-rw-r--r--usr.bin/gcore/aoutcore.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/gcore/aoutcore.c b/usr.bin/gcore/aoutcore.c
index 4702003b8afc..6d8f9d358cc8 100644
--- a/usr.bin/gcore/aoutcore.c
+++ b/usr.bin/gcore/aoutcore.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)gcore.c 8.2 (Berkeley) 9/23/93";
#endif
static const char rcsid[] =
- "$Id: gcore.c,v 1.12 1998/10/22 04:02:37 jdp Exp $";
+ "$Id: gcore.c,v 1.13 1998/11/01 06:35:36 jdp Exp $";
#endif /* not lint */
/*
@@ -281,11 +281,12 @@ datadump(efd, fd, p, addr, npage)
if (lseek(efd, (off_t)addr + delta, SEEK_SET) == -1)
err(1, "seek executable: %s", strerror(errno));
cc = read(efd, buffer, sizeof(buffer));
- if (cc != sizeof(buffer))
+ if (cc != sizeof(buffer)) {
if (cc < 0)
err(1, "read executable");
else /* Assume untouched bss page. */
bzero(buffer, sizeof(buffer));
+ }
}
cc = write(fd, buffer, PAGE_SIZE);
if (cc != PAGE_SIZE)