libedit: replace 0 with NULL for pointers.
Found with devel/coccinelle. Reviewed by: Christos Zoulas
This commit is contained in:
parent
4cace9ebf6
commit
14eaf4448c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=297757
@ -471,7 +471,7 @@ fn_complete(EditLine *el,
|
|||||||
|
|
||||||
/* these can be used by function called in completion_matches() */
|
/* these can be used by function called in completion_matches() */
|
||||||
/* or (*attempted_completion_function)() */
|
/* or (*attempted_completion_function)() */
|
||||||
if (point != 0)
|
if (point != NULL)
|
||||||
*point = (int)(li->cursor - li->buffer);
|
*point = (int)(li->cursor - li->buffer);
|
||||||
if (end != NULL)
|
if (end != NULL)
|
||||||
*end = (int)(li->lastchar - li->buffer);
|
*end = (int)(li->lastchar - li->buffer);
|
||||||
@ -483,7 +483,7 @@ fn_complete(EditLine *el,
|
|||||||
&el->el_scratch),
|
&el->el_scratch),
|
||||||
cur_off - (int)len, cur_off);
|
cur_off - (int)len, cur_off);
|
||||||
} else
|
} else
|
||||||
matches = 0;
|
matches = NULL;
|
||||||
if (!attempted_completion_function ||
|
if (!attempted_completion_function ||
|
||||||
(over != NULL && !*over && !matches))
|
(over != NULL && !*over && !matches))
|
||||||
matches = completion_matches(
|
matches = completion_matches(
|
||||||
|
@ -1088,7 +1088,7 @@ vi_history_word(EditLine *el, Int c __attribute__((__unused__)))
|
|||||||
if (wp == NULL)
|
if (wp == NULL)
|
||||||
return CC_ERROR;
|
return CC_ERROR;
|
||||||
|
|
||||||
wep = wsp = 0;
|
wep = wsp = NULL;
|
||||||
do {
|
do {
|
||||||
while (Isspace(*wp))
|
while (Isspace(*wp))
|
||||||
wp++;
|
wp++;
|
||||||
@ -1101,7 +1101,7 @@ vi_history_word(EditLine *el, Int c __attribute__((__unused__)))
|
|||||||
} while ((!el->el_state.doingarg || --el->el_state.argument > 0)
|
} while ((!el->el_state.doingarg || --el->el_state.argument > 0)
|
||||||
&& *wp != 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;
|
return CC_ERROR;
|
||||||
|
|
||||||
cv_undo(el);
|
cv_undo(el);
|
||||||
|
Loading…
Reference in New Issue
Block a user