Date: Sat, 9 Apr 2016 18:52:10 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297757 - head/lib/libedit Message-ID: <201604091852.u39IqAem069585@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604091852.u39IqAem069585>