From owner-svn-src-all@freebsd.org Sat Apr 9 18:52:11 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 4435AB08751; Sat, 9 Apr 2016 18:52:11 +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 11D541119; Sat, 9 Apr 2016 18:52:10 +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 u39IqApb069587; Sat, 9 Apr 2016 18:52:10 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u39IqAem069585; Sat, 9 Apr 2016 18:52:10 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201604091852.u39IqAem069585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 9 Apr 2016 18:52:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297757 - head/lib/libedit 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: Sat, 09 Apr 2016 18:52:11 -0000 Author: pfg Date: Sat Apr 9 18:52:09 2016 New Revision: 297757 URL: https://svnweb.freebsd.org/changeset/base/297757 Log: libedit: replace 0 with NULL for pointers. Found with devel/coccinelle. Reviewed by: Christos Zoulas Modified: head/lib/libedit/filecomplete.c head/lib/libedit/vi.c Modified: head/lib/libedit/filecomplete.c ============================================================================== --- head/lib/libedit/filecomplete.c Sat Apr 9 18:39:57 2016 (r297756) +++ head/lib/libedit/filecomplete.c Sat Apr 9 18:52:09 2016 (r297757) @@ -471,7 +471,7 @@ fn_complete(EditLine *el, /* these can be used by function called in completion_matches() */ /* or (*attempted_completion_function)() */ - if (point != 0) + if (point != NULL) *point = (int)(li->cursor - li->buffer); if (end != NULL) *end = (int)(li->lastchar - li->buffer); @@ -483,7 +483,7 @@ fn_complete(EditLine *el, &el->el_scratch), cur_off - (int)len, cur_off); } else - matches = 0; + matches = NULL; if (!attempted_completion_function || (over != NULL && !*over && !matches)) matches = completion_matches( Modified: head/lib/libedit/vi.c ============================================================================== --- head/lib/libedit/vi.c Sat Apr 9 18:39:57 2016 (r297756) +++ head/lib/libedit/vi.c Sat Apr 9 18:52:09 2016 (r297757) @@ -1088,7 +1088,7 @@ vi_history_word(EditLine *el, Int c __at if (wp == NULL) return CC_ERROR; - wep = wsp = 0; + wep = wsp = NULL; do { while (Isspace(*wp)) wp++; @@ -1101,7 +1101,7 @@ vi_history_word(EditLine *el, Int c __at } while ((!el->el_state.doingarg || --el->el_state.argument > 0) && *wp != 0); - if (wsp == 0 || (el->el_state.doingarg && el->el_state.argument != 0)) + if (wsp == NULL || (el->el_state.doingarg && el->el_state.argument != 0)) return CC_ERROR; cv_undo(el);