Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libedit Change some 0's to NULL's from Pedro Giffuni



details:   https://anonhg.NetBSD.org/src/rev/2a3814338a3b
branches:  trunk
changeset: 814791:2a3814338a3b
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Apr 09 18:47:05 2016 +0000

description:
Change some 0's to NULL's from Pedro Giffuni

diffstat:

 lib/libedit/filecomplete.c |  8 ++++----
 lib/libedit/vi.c           |  8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diffs (72 lines):

diff -r 1772156b433e -r 2a3814338a3b lib/libedit/filecomplete.c
--- a/lib/libedit/filecomplete.c        Sat Apr 09 18:43:17 2016 +0000
+++ b/lib/libedit/filecomplete.c        Sat Apr 09 18:47:05 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: filecomplete.c,v 1.40 2016/02/17 19:47:49 christos Exp $       */
+/*     $NetBSD: filecomplete.c,v 1.41 2016/04/09 18:47:05 christos Exp $       */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: filecomplete.c,v 1.40 2016/02/17 19:47:49 christos Exp $");
+__RCSID("$NetBSD: filecomplete.c,v 1.41 2016/04/09 18:47:05 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <sys/types.h>
@@ -449,7 +449,7 @@
 
        /* 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);
@@ -460,7 +460,7 @@
                    ct_encode_string(temp, &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(
diff -r 1772156b433e -r 2a3814338a3b lib/libedit/vi.c
--- a/lib/libedit/vi.c  Sat Apr 09 18:43:17 2016 +0000
+++ b/lib/libedit/vi.c  Sat Apr 09 18:47:05 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vi.c,v 1.56 2016/04/09 18:43:17 christos Exp $ */
+/*     $NetBSD: vi.c,v 1.57 2016/04/09 18:47:05 christos Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)vi.c       8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: vi.c,v 1.56 2016/04/09 18:43:17 christos Exp $");
+__RCSID("$NetBSD: vi.c,v 1.57 2016/04/09 18:47:05 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -1092,7 +1092,7 @@
        if (wp == NULL)
                return CC_ERROR;
 
-       wep = wsp = 0;
+       wep = wsp = NULL;
        do {
                while (iswspace(*wp))
                        wp++;
@@ -1105,7 +1105,7 @@
        } 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);



Home | Main Index | Thread Index | Old Index