From d04f0948d6e53741d4679699c041dc2787650361 Mon Sep 17 00:00:00 2001 From: rlar Date: Mon, 6 Feb 2012 20:21:47 +0000 Subject: [PATCH] preserve const'ness of some casts --- ChangeLog | 5 +++++ src/frontend/vectors.c | 4 ++-- src/misc/wlist.c | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2a39569e1..7141acfd1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-02-06 Robert Larice + * src/frontend/vectors.c , + * src/misc/wlist.c : + preserve const'ness of some casts + 2012-02-06 Robert Larice * src/frontend/numparam/spicenum.c : drop (void*) cast of the dispose() argument diff --git a/src/frontend/vectors.c b/src/frontend/vectors.c index 7c394e41a..352a11053 100644 --- a/src/frontend/vectors.c +++ b/src/frontend/vectors.c @@ -145,8 +145,8 @@ namecmp(const void *a, const void *b) { int i, j; - char *s = (char *) a; - char *t = (char *) b; + const char *s = (const char *) a; + const char *t = (const char *) b; for (;;) { while ((*s == *t) && !isdigit(*s) && *s) s++, t++; diff --git a/src/misc/wlist.c b/src/misc/wlist.c index dee9facab..973cd8d12 100644 --- a/src/misc/wlist.c +++ b/src/misc/wlist.c @@ -228,8 +228,8 @@ wl_nthelem(int i, wordlist *wl) static int wlcomp(const void *a, const void *b) { - char **s = (char **) a; - char **t = (char **) b; + const char **s = (const char **) a; + const char **t = (const char **) b; return (strcmp(*s, *t)); }