Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/nvi/dist/common No need to cast endp in both ca...



details:   https://anonhg.NetBSD.org/src/rev/edf91c2e3c22
branches:  trunk
changeset: 827774:edf91c2e3c22
user:      rin <rin%NetBSD.org@localhost>
date:      Sun Nov 12 15:26:33 2017 +0000

description:
No need to cast endp in both cases of USE_WIDECHAR == "yes" nor "no".
Note that RCHAR_T is intended to use for bundled regex, not for nvi itself.

diffstat:

 external/bsd/nvi/dist/common/util.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 9325165aa743 -r edf91c2e3c22 external/bsd/nvi/dist/common/util.c
--- a/external/bsd/nvi/dist/common/util.c       Sun Nov 12 15:23:51 2017 +0000
+++ b/external/bsd/nvi/dist/common/util.c       Sun Nov 12 15:26:33 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: util.c,v 1.3 2014/01/26 21:43:45 christos Exp $ */
+/*     $NetBSD: util.c,v 1.4 2017/11/12 15:26:33 rin Exp $ */
 /*-
  * Copyright (c) 1991, 1993, 1994
  *     The Regents of the University of California.  All rights reserved.
@@ -16,7 +16,7 @@
 static const char sccsid[] = "Id: util.c,v 10.22 2001/06/25 15:19:12 skimo Exp  (Berkeley) Date: 2001/06/25 15:19:12 ";
 #endif /* not lint */
 #else
-__RCSID("$NetBSD: util.c,v 1.3 2014/01/26 21:43:45 christos Exp $");
+__RCSID("$NetBSD: util.c,v 1.4 2017/11/12 15:26:33 rin Exp $");
 #endif
 
 #include <sys/types.h>
@@ -169,7 +169,7 @@
 nget_uslong(SCR *sp, u_long *valp, const CHAR_T *p, CHAR_T **endp, int base)
 {
        errno = 0;
-       *valp = STRTOUL(p, (RCHAR_T **)endp, base);
+       *valp = STRTOUL(p, endp, base);
        if (errno == 0)
                return (NUM_OK);
        if (errno == ERANGE && *valp == ULONG_MAX)
@@ -187,7 +187,7 @@
 nget_slong(SCR *sp, long int *valp, const CHAR_T *p, CHAR_T **endp, int base)
 {
        errno = 0;
-       *valp = STRTOL(p, (RCHAR_T **)endp, base);
+       *valp = STRTOL(p, endp, base);
        if (errno == 0)
                return (NUM_OK);
        if (errno == ERANGE) {



Home | Main Index | Thread Index | Old Index