diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2016-04-09 20:28:28 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2016-04-09 20:28:28 +0000 |
commit | 4214f864099f0ef880f014f7bdefd68e7686e8c0 (patch) | |
tree | 122453430a6d7710835d8565f93fa89a5a93a96e /lib | |
parent | fcdbfdf8477aba1fd8ec89db86623358fac6671f (diff) |
For pointers, use NULL rather than 0; no functional change;
from Pedro Giffuni via Christos Zoulas.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libedit/filecomplete.c | 6 | ||||
-rw-r--r-- | lib/libedit/vi.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/libedit/filecomplete.c b/lib/libedit/filecomplete.c index 82f69099efd..bf283d8676f 100644 --- a/lib/libedit/filecomplete.c +++ b/lib/libedit/filecomplete.c @@ -1,4 +1,4 @@ -/* $OpenBSD: filecomplete.c,v 1.9 2016/03/20 23:48:27 schwarze Exp $ */ +/* $OpenBSD: filecomplete.c,v 1.10 2016/04/09 20:28:27 schwarze Exp $ */ /* $NetBSD: filecomplete.c,v 1.22 2010/12/02 04:42:46 dholland Exp $ */ /*- @@ -429,7 +429,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); @@ -440,7 +440,7 @@ fn_complete(EditLine *el, ct_encode_string(temp, &el->el_scratch), (int)(cur_off - len), cur_off); } else - matches = 0; + matches = NULL; if (!attempted_completion_function || (over != NULL && !*over && !matches)) matches = completion_matches( diff --git a/lib/libedit/vi.c b/lib/libedit/vi.c index c3f60855f34..5cf96a3de94 100644 --- a/lib/libedit/vi.c +++ b/lib/libedit/vi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vi.c,v 1.20 2016/04/09 20:15:26 schwarze Exp $ */ +/* $OpenBSD: vi.c,v 1.21 2016/04/09 20:28:27 schwarze Exp $ */ /* $NetBSD: vi.c,v 1.33 2011/02/17 16:44:48 joerg Exp $ */ /*- @@ -1099,7 +1099,7 @@ vi_history_word(EditLine *el, wint_t c __attribute__((__unused__))) if (wp == NULL) return CC_ERROR; - wep = wsp = 0; + wep = wsp = NULL; do { while (iswspace(*wp)) wp++; @@ -1112,7 +1112,7 @@ vi_history_word(EditLine *el, wint_t c __attribute__((__unused__))) } 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); |