From 3fbc0658fd4982e90fc6c85559184e038f9fd3d9 Mon Sep 17 00:00:00 2001 From: charnier Date: Fri, 12 Apr 2002 21:36:54 +0000 Subject: Do not print error message twice. --- usr.bin/gcore/aoutcore.c | 8 +++++--- usr.bin/gcore/gcore.c | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/gcore/aoutcore.c b/usr.bin/gcore/aoutcore.c index c6e29d1..00f2967 100644 --- a/usr.bin/gcore/aoutcore.c +++ b/usr.bin/gcore/aoutcore.c @@ -41,10 +41,11 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)gcore.c 8.2 (Berkeley) 9/23/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ +#include +__FBSDID("$FreeBSD$"); + /* * Originally written by Eric Cooper in Fall 1981. * Inspired by a version 6 program by Len Levin, 1978. @@ -56,6 +57,7 @@ static const char rcsid[] = * Engineering group at Lawrence Berkeley Laboratory under DARPA * contract BG 91-66 and contributed to Berkeley. */ + #include #include #include @@ -284,7 +286,7 @@ datadump(efd, fd, kp, addr, npage) if (cc != PAGE_SIZE) { /* Try to read the page from the executable. */ if (lseek(efd, (off_t)addr + delta, SEEK_SET) == -1) - err(1, "seek executable: %s", strerror(errno)); + err(1, "seek executable"); cc = read(efd, buffer, sizeof(buffer)); if (cc != sizeof(buffer)) { if (cc < 0) diff --git a/usr.bin/gcore/gcore.c b/usr.bin/gcore/gcore.c index c6e29d1..00f2967 100644 --- a/usr.bin/gcore/gcore.c +++ b/usr.bin/gcore/gcore.c @@ -41,10 +41,11 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)gcore.c 8.2 (Berkeley) 9/23/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ +#include +__FBSDID("$FreeBSD$"); + /* * Originally written by Eric Cooper in Fall 1981. * Inspired by a version 6 program by Len Levin, 1978. @@ -56,6 +57,7 @@ static const char rcsid[] = * Engineering group at Lawrence Berkeley Laboratory under DARPA * contract BG 91-66 and contributed to Berkeley. */ + #include #include #include @@ -284,7 +286,7 @@ datadump(efd, fd, kp, addr, npage) if (cc != PAGE_SIZE) { /* Try to read the page from the executable. */ if (lseek(efd, (off_t)addr + delta, SEEK_SET) == -1) - err(1, "seek executable: %s", strerror(errno)); + err(1, "seek executable"); cc = read(efd, buffer, sizeof(buffer)); if (cc != sizeof(buffer)) { if (cc < 0) -- cgit v1.1