summaryrefslogtreecommitdiff
path: root/usr.bin/gprof
diff options
context:
space:
mode:
authorMarcelo Araujo <araujo@FreeBSD.org>2016-05-16 01:11:02 +0000
committerMarcelo Araujo <araujo@FreeBSD.org>2016-05-16 01:11:02 +0000
commit26d0a722963d154c2e37c6751c819a13c248aeb4 (patch)
tree935a1618e7a8efcf52ffb1d5b1d5721771b9f36b /usr.bin/gprof
parentf8358c11a5a31da3b459f22137a74588fc99e195 (diff)
downloadsrc-test-26d0a722963d154c2e37c6751c819a13c248aeb4.tar.gz
src-test-26d0a722963d154c2e37c6751c819a13c248aeb4.zip
Use NULL instead of 0 for pointers.
MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=299877
Diffstat (limited to 'usr.bin/gprof')
-rw-r--r--usr.bin/gprof/aout.c4
-rw-r--r--usr.bin/gprof/arcs.c6
-rw-r--r--usr.bin/gprof/gprof.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/gprof/aout.c b/usr.bin/gprof/aout.c
index 76ad07ea86dfa..7907d466df687 100644
--- a/usr.bin/gprof/aout.c
+++ b/usr.bin/gprof/aout.c
@@ -132,7 +132,7 @@ getsymtab(FILE *nfile, const char *filename)
errx( 1 , "%s: no symbols" , filename );
askfor = nname + 1;
nl = (nltype *) calloc( askfor , sizeof(nltype) );
- if (nl == 0)
+ if (nl == NULL)
errx( 1 , "no room for %zu bytes of symbol table" ,
askfor * sizeof(nltype) );
@@ -173,7 +173,7 @@ gettextspace(FILE *nfile)
{
textspace = (u_char *) malloc( xbuf.a_text );
- if ( textspace == 0 ) {
+ if ( textspace == NULL ) {
warnx("no room for %u bytes of text space: can't do -c" ,
xbuf.a_text );
return;
diff --git a/usr.bin/gprof/arcs.c b/usr.bin/gprof/arcs.c
index c5b2e96bbe06f..4bea6c67186be 100644
--- a/usr.bin/gprof/arcs.c
+++ b/usr.bin/gprof/arcs.c
@@ -376,7 +376,7 @@ cyclelink(void)
* i.e. it is origin 1, not origin 0.
*/
cyclenl = (nltype *) calloc( ncycle + 1 , sizeof( nltype ) );
- if ( cyclenl == 0 )
+ if ( cyclenl == NULL )
errx( 1 , "no room for %zu bytes of cycle headers" ,
( ncycle + 1 ) * sizeof( nltype ) );
/*
@@ -479,7 +479,7 @@ cycleanalyze(void)
continue;
done = FALSE;
cyclestack = (arctype **) calloc( size + 1 , sizeof( arctype *) );
- if ( cyclestack == 0 )
+ if ( cyclestack == NULL )
errx( 1, "no room for %zu bytes of cycle stack" ,
( size + 1 ) * sizeof( arctype * ) );
# ifdef DEBUG
@@ -592,7 +592,7 @@ addcycle(arctype **stkstart, arctype **stkend)
}
clp = (cltype *)
calloc( 1 , sizeof ( cltype ) + ( size - 1 ) * sizeof( arctype * ) );
- if ( clp == 0 ) {
+ if ( clp == NULL ) {
warnx( "no room for %zu bytes of subcycle storage" ,
sizeof ( cltype ) + ( size - 1 ) * sizeof( arctype * ) );
return( FALSE );
diff --git a/usr.bin/gprof/gprof.c b/usr.bin/gprof/gprof.c
index e05d628e4cf8b..879b0acb75aea 100644
--- a/usr.bin/gprof/gprof.c
+++ b/usr.bin/gprof/gprof.c
@@ -407,7 +407,7 @@ readsamples(FILE *pfile)
if (samples == 0) {
samples = (double *) calloc(nsamples, sizeof(double));
- if (samples == 0)
+ if (samples == NULL)
errx(0, "no room for %d sample pc's", nsamples);
}
for (i = 0; i < nsamples; i++) {