From owner-svn-src-all@freebsd.org Thu Apr 14 12:51:07 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 DD8AAB0E568; Thu, 14 Apr 2016 12:51:07 +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 AF3F61234; Thu, 14 Apr 2016 12:51:07 +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 u3ECp6cH080720; Thu, 14 Apr 2016 12:51:06 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3ECp6eN080719; Thu, 14 Apr 2016 12:51:06 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201604141251.u3ECp6eN080719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Thu, 14 Apr 2016 12:51:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297964 - head/usr.sbin/fstyp 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.21 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: Thu, 14 Apr 2016 12:51:08 -0000 Author: araujo Date: Thu Apr 14 12:51:06 2016 New Revision: 297964 URL: https://svnweb.freebsd.org/changeset/base/297964 Log: Use NULL instead of 0 for pointers. The malloc will return a pointer to the allocated memory if successful, otherwise a NULL pointer is returned. Modified: head/usr.sbin/fstyp/fstyp.c Modified: head/usr.sbin/fstyp/fstyp.c ============================================================================== --- head/usr.sbin/fstyp/fstyp.c Thu Apr 14 12:50:27 2016 (r297963) +++ head/usr.sbin/fstyp/fstyp.c Thu Apr 14 12:51:06 2016 (r297964) @@ -82,7 +82,7 @@ read_buf(FILE *fp, off_t off, size_t len } buf = malloc(len); - if (buf == 0) { + if (buf == NULL) { warn("cannot malloc %zd bytes of memory", len); return (NULL); }