summaryrefslogtreecommitdiffstats
path: root/usr.bin/gcore
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1999-07-17 19:03:20 +0000
committerjdp <jdp@FreeBSD.org>1999-07-17 19:03:20 +0000
commit328f802cb68dae2040edddfbc12e50656b6ce276 (patch)
treefbb290c07d5080cb7a6f0c9ebf74f3104cb460d0 /usr.bin/gcore
parent05b2f4263f6f1b390e22c470eff21c54475d7808 (diff)
downloadFreeBSD-src-328f802cb68dae2040edddfbc12e50656b6ce276.zip
FreeBSD-src-328f802cb68dae2040edddfbc12e50656b6ce276.tar.gz
Add braces to appease the egcs -Wall mom.
Diffstat (limited to 'usr.bin/gcore')
-rw-r--r--usr.bin/gcore/aoutcore.c5
-rw-r--r--usr.bin/gcore/gcore.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/gcore/aoutcore.c b/usr.bin/gcore/aoutcore.c
index 4702003..6d8f9d3 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)
diff --git a/usr.bin/gcore/gcore.c b/usr.bin/gcore/gcore.c
index 4702003..6d8f9d3 100644
--- a/usr.bin/gcore/gcore.c
+++ b/usr.bin/gcore/gcore.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)
OpenPOWER on IntegriCloud