From 064bebe6d3d4f05ecc20524571d6bc4519997bd5 Mon Sep 17 00:00:00 2001 From: charnier Date: Wed, 16 Oct 2002 13:50:09 +0000 Subject: Remove done() which was just exit() so use of warn()/err() can be made. Abort on allocation failure instead of displaying a warning and deferencing NULL pointer after. Spelling. Add prototypes. Add list of option in synopsis section of man page, -d is not referenced because available as a compile option. It should be made a runtime option btw. --- usr.bin/gprof/elf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.bin/gprof/elf.c') diff --git a/usr.bin/gprof/elf.c b/usr.bin/gprof/elf.c index 65cc873..b0af431 100644 --- a/usr.bin/gprof/elf.c +++ b/usr.bin/gprof/elf.c @@ -81,10 +81,10 @@ elf_getnfile(const char *filename, char ***defaultEs) return -1; } if (fstat(fd, &s) == -1) - err(1, "Cannot fstat %s", filename); + err(1, "cannot fstat %s", filename); if ((mapbase = mmap(0, s.st_size, PROT_READ, MAP_SHARED, fd, 0)) == MAP_FAILED) - err(1, "Cannot mmap %s", filename); + err(1, "cannot mmap %s", filename); close(fd); base = (const char *)mapbase; @@ -111,7 +111,7 @@ elf_getnfile(const char *filename, char ***defaultEs) /* Allocate memory for them, plus a terminating entry. */ if ((nl = (nltype *)calloc(nname + 1, sizeof(nltype))) == NULL) - errx(1, "Insufficient memory for symbol table"); + errx(1, "insufficient memory for symbol table"); /* Read them in. */ npe = nl; -- cgit v1.1