Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/jemalloc/dist/src remove needless casts after f...



details:   https://anonhg.NetBSD.org/src/rev/c88bcc5ea9fa
branches:  trunk
changeset: 997327:c88bcc5ea9fa
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Mar 04 17:16:27 2019 +0000

description:
remove needless casts after fixing prototype.

diffstat:

 external/bsd/jemalloc/dist/src/malloc_io.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (42 lines):

diff -r 5eabfea0cb27 -r c88bcc5ea9fa external/bsd/jemalloc/dist/src/malloc_io.c
--- a/external/bsd/jemalloc/dist/src/malloc_io.c        Mon Mar 04 17:15:37 2019 +0000
+++ b/external/bsd/jemalloc/dist/src/malloc_io.c        Mon Mar 04 17:16:27 2019 +0000
@@ -111,7 +111,7 @@
 }
 
 uintmax_t
-malloc_strtoumax(const char *restrict nptr, char **restrict endptr, int base) {
+malloc_strtoumax(const char *restrict nptr, const char **restrict endptr, int base) {
        uintmax_t ret, digit;
        unsigned b;
        bool neg;
@@ -223,9 +223,9 @@
        if (endptr != NULL) {
                if (p == ns) {
                        /* No characters were converted. */
-                       *endptr = (char *)nptr;
+                       *endptr = nptr;
                } else {
-                       *endptr = (char *)p;
+                       *endptr = p;
                }
        }
        return ret;
@@ -460,7 +460,7 @@
                        case '5': case '6': case '7': case '8': case '9': {
                                uintmax_t uwidth;
                                set_errno(0);
-                               uwidth = malloc_strtoumax(f, (char **)&f, 10);
+                               uwidth = malloc_strtoumax(f, &f, 10);
                                assert(uwidth != UINTMAX_MAX || get_errno() !=
                                    ERANGE);
                                width = (int)uwidth;
@@ -484,7 +484,7 @@
                        case '5': case '6': case '7': case '8': case '9': {
                                uintmax_t uprec;
                                set_errno(0);
-                               uprec = malloc_strtoumax(f, (char **)&f, 10);
+                               uprec = malloc_strtoumax(f, &f, 10);
                                assert(uprec != UINTMAX_MAX || get_errno() !=
                                    ERANGE);
                                prec = (int)uprec;



Home | Main Index | Thread Index | Old Index