summaryrefslogtreecommitdiff
path: root/usr.bin/gprof/arcs.c
diff options
context:
space:
mode:
authorPhilippe Charnier <charnier@FreeBSD.org>1997-07-10 06:45:02 +0000
committerPhilippe Charnier <charnier@FreeBSD.org>1997-07-10 06:45:02 +0000
commitb34f7debd8abe0bfc30995eea94fce9f0cc84c0c (patch)
treebe8ce4a486df5401ddd33770733d075e3dccfbd7 /usr.bin/gprof/arcs.c
parent710d46eadcb7ce492aac91a12a7da0fcfb0d9e93 (diff)
Notes
Diffstat (limited to 'usr.bin/gprof/arcs.c')
-rw-r--r--usr.bin/gprof/arcs.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/usr.bin/gprof/arcs.c b/usr.bin/gprof/arcs.c
index 2c22469641f5..2a06220515c8 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;