From owner-svn-src-all@freebsd.org Mon May 16 01:11:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C53C4B3C1C3; Mon, 16 May 2016 01:11:03 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 896161F94; Mon, 16 May 2016 01:11:03 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4G1B2XD060797; Mon, 16 May 2016 01:11:02 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4G1B2RO060794; Mon, 16 May 2016 01:11:02 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201605160111.u4G1B2RO060794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 16 May 2016 01:11:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299877 - head/usr.bin/gprof X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2016 01:11:03 -0000 Author: araujo Date: Mon May 16 01:11:02 2016 New Revision: 299877 URL: https://svnweb.freebsd.org/changeset/base/299877 Log: Use NULL instead of 0 for pointers. MFC after: 2 weeks Modified: head/usr.bin/gprof/aout.c head/usr.bin/gprof/arcs.c head/usr.bin/gprof/gprof.c Modified: head/usr.bin/gprof/aout.c ============================================================================== --- head/usr.bin/gprof/aout.c Mon May 16 00:36:12 2016 (r299876) +++ head/usr.bin/gprof/aout.c Mon May 16 01:11:02 2016 (r299877) @@ -132,7 +132,7 @@ getsymtab(FILE *nfile, const char *filen 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; Modified: head/usr.bin/gprof/arcs.c ============================================================================== --- head/usr.bin/gprof/arcs.c Mon May 16 00:36:12 2016 (r299876) +++ head/usr.bin/gprof/arcs.c Mon May 16 01:11:02 2016 (r299877) @@ -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 **s } 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 ); Modified: head/usr.bin/gprof/gprof.c ============================================================================== --- head/usr.bin/gprof/gprof.c Mon May 16 00:36:12 2016 (r299876) +++ head/usr.bin/gprof/gprof.c Mon May 16 01:11:02 2016 (r299877) @@ -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++) {