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);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to