From owner-svn-src-head@freebsd.org Mon Apr 18 14:45:58 2016 Return-Path: Delivered-To: svn-src-head@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 28C53B13B66; Mon, 18 Apr 2016 14:45:58 +0000 (UTC) (envelope-from pfg@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 DA8341EC4; Mon, 18 Apr 2016 14:45:57 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3IEjvcP094548; Mon, 18 Apr 2016 14:45:57 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3IEjuqE094545; Mon, 18 Apr 2016 14:45:56 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201604181445.u3IEjuqE094545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 18 Apr 2016 14:45:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298210 - head/lib/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2016 14:45:58 -0000 Author: pfg Date: Mon Apr 18 14:45:56 2016 New Revision: 298210 URL: https://svnweb.freebsd.org/changeset/base/298210 Log: libstand: use NULL instead of zero for pointers. Modified: head/lib/libstand/cd9660.c head/lib/libstand/nfs.c head/lib/libstand/strtol.c Modified: head/lib/libstand/cd9660.c ============================================================================== --- head/lib/libstand/cd9660.c Mon Apr 18 14:44:01 2016 (r298209) +++ head/lib/libstand/cd9660.c Mon Apr 18 14:45:56 2016 (r298210) @@ -273,13 +273,13 @@ dirmatch(struct open_file *f, const char static int cd9660_open(const char *path, struct open_file *f) { - struct file *fp = 0; + struct file *fp = NULL; void *buf; struct iso_primary_descriptor *vd; size_t buf_size, read, dsize, off; daddr_t bno, boff; struct iso_directory_record rec; - struct iso_directory_record *dp = 0; + struct iso_directory_record *dp = NULL; int rc, first, use_rrip, lenskip; /* First find the volume descriptor */ @@ -415,7 +415,7 @@ cd9660_close(struct open_file *f) { struct file *fp = (struct file *)f->f_fsdata; - f->f_fsdata = 0; + f->f_fsdata = NULL; free(fp); return 0; Modified: head/lib/libstand/nfs.c ============================================================================== --- head/lib/libstand/nfs.c Mon Apr 18 14:44:01 2016 (r298209) +++ head/lib/libstand/nfs.c Mon Apr 18 14:45:56 2016 (r298210) @@ -511,7 +511,7 @@ nfs_open(const char *upath, struct open_ #ifndef NFS_NOSYMLINK bcopy(&nfs_root_node, currfd, sizeof(*currfd)); - newfd = 0; + newfd = NULL; cp = path = strdup(upath); if (path == NULL) { @@ -593,14 +593,14 @@ nfs_open(const char *upath, struct open_ bcopy(&nfs_root_node, currfd, sizeof(*currfd)); free(newfd); - newfd = 0; + newfd = NULL; continue; } free(currfd); currfd = newfd; - newfd = 0; + newfd = NULL; } error = 0; @@ -1155,7 +1155,7 @@ nfs_open(const char *upath, struct open_ } #ifndef NFS_NOSYMLINK bcopy(&nfs_root_node, currfd, sizeof(*currfd)); - newfd = 0; + newfd = NULL; cp = path = strdup(upath); if (path == NULL) { @@ -1241,14 +1241,14 @@ nfs_open(const char *upath, struct open_ bcopy(&nfs_root_node, currfd, sizeof(*currfd)); free(newfd); - newfd = 0; + newfd = NULL; continue; } free(currfd); currfd = newfd; - newfd = 0; + newfd = NULL; } error = 0; Modified: head/lib/libstand/strtol.c ============================================================================== --- head/lib/libstand/strtol.c Mon Apr 18 14:44:01 2016 (r298209) +++ head/lib/libstand/strtol.c Mon Apr 18 14:45:56 2016 (r298210) @@ -126,7 +126,7 @@ strtol(nptr, endptr, base) errno = ERANGE; } else if (neg) acc = -acc; - if (endptr != 0) + if (endptr != NULL) *endptr = (char *)(any ? s - 1 : nptr); return (acc); }