diff options
author | charnier <charnier@FreeBSD.org> | 2002-10-16 13:50:09 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 2002-10-16 13:50:09 +0000 |
commit | 064bebe6d3d4f05ecc20524571d6bc4519997bd5 (patch) | |
tree | d111768d17cfb105c6bbb279f69b9a271d1a9c41 /usr.bin/gprof/elf.c | |
parent | 6dec6a19baa7759402451fa076be28cc26359333 (diff) | |
download | FreeBSD-src-064bebe6d3d4f05ecc20524571d6bc4519997bd5.zip FreeBSD-src-064bebe6d3d4f05ecc20524571d6bc4519997bd5.tar.gz |
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.
Diffstat (limited to 'usr.bin/gprof/elf.c')
-rw-r--r-- | usr.bin/gprof/elf.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |