diff options
author | charnier <charnier@FreeBSD.org> | 1997-07-10 06:45:02 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 1997-07-10 06:45:02 +0000 |
commit | 3e5d2f9ca56d4333f70c1ca8d3b4c882ace01e89 (patch) | |
tree | 54a9925733c8cac2abef93a67a8af5379fe30126 /usr.bin/gprof/arcs.c | |
parent | fecd0ac4cdef9377593fc851182a346a94294b0e (diff) | |
download | FreeBSD-src-3e5d2f9ca56d4333f70c1ca8d3b4c882ace01e89.zip FreeBSD-src-3e5d2f9ca56d4333f70c1ca8d3b4c882ace01e89.tar.gz |
Use err(3).
Diffstat (limited to 'usr.bin/gprof/arcs.c')
-rw-r--r-- | usr.bin/gprof/arcs.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/usr.bin/gprof/arcs.c b/usr.bin/gprof/arcs.c index 2c22469..2a06220 100644 --- a/usr.bin/gprof/arcs.c +++ b/usr.bin/gprof/arcs.c @@ -32,9 +32,14 @@ */ #ifndef lint -static char sccsid[] = "@(#)arcs.c 8.1 (Berkeley) 6/6/93"; +#if 0 +static char sccsid[] = "@(#)arcs.c 8.1 (Berkeley) 6/6/93";Q +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ +#include <err.h> #include "gprof.h" #ifdef DEBUG @@ -235,7 +240,7 @@ doarcs() */ timesortnlp = (nltype **) calloc( nname + ncycle , sizeof(nltype *) ); if ( timesortnlp == (nltype **) 0 ) { - fprintf( stderr , "%s: ran out of memory for sorting\n" , whoami ); + warnx("ran out of memory for sorting"); } for ( index = 0 ; index < nname ; index++ ) { timesortnlp[index] = &nl[index]; @@ -374,8 +379,7 @@ cyclelink() */ cyclenl = (nltype *) calloc( ncycle + 1 , sizeof( nltype ) ); if ( cyclenl == 0 ) { - fprintf( stderr , "%s: No room for %d bytes of cycle headers\n" , - whoami , ( ncycle + 1 ) * sizeof( nltype ) ); + warnx("no room for %d bytes of cycle headers", (ncycle+1)*sizeof(nltype) ); done(); } /* @@ -478,8 +482,7 @@ cycleanalyze() done = FALSE; cyclestack = (arctype **) calloc( size + 1 , sizeof( arctype *) ); if ( cyclestack == 0 ) { - fprintf( stderr , "%s: No room for %d bytes of cycle stack\n" , - whoami , ( size + 1 ) * sizeof( arctype * ) ); + warnx("no room for %d bytes of cycle stack", (size+1)*sizeof(arctype *) ); return; } # ifdef DEBUG @@ -595,8 +598,8 @@ addcycle( stkstart , stkend ) clp = (cltype *) calloc( 1 , sizeof ( cltype ) + ( size - 1 ) * sizeof( arctype * ) ); if ( clp == 0 ) { - fprintf( stderr , "%s: No room for %d bytes of subcycle storage\n" , - whoami , sizeof ( cltype ) + ( size - 1 ) * sizeof( arctype * ) ); + warnx("no room for %d bytes of subcycle storage", + sizeof ( cltype ) + ( size - 1 ) * sizeof( arctype * ) ); return( FALSE ); } stkp = stkloc; @@ -641,7 +644,6 @@ compresslist() int maxexitcnt; int maxwithparentcnt; int maxnoparentcnt; - char *type; maxexitcnt = 0; maxwithparentcnt = 0; |