From 2692bfe8eec8f8a78299ae9161dc55f3a515944e Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 13 Apr 2019 19:09:56 +0100 Subject: [PATCH] provide_xrm_string: make argument type const char *. All call sites so far have happened to pass it a mutable string, but it doesn't actually need one. --- unix/unix.h | 2 +- unix/uxstore.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/unix/unix.h b/unix/unix.h index 903805dc..0f3c50ac 100644 --- a/unix/unix.h +++ b/unix/unix.h @@ -267,7 +267,7 @@ int keysym_to_unicode(int keysym); char *x_get_default(const char *key); /* Things uxstore.c provides to gtkwin.c */ -void provide_xrm_string(char *string); +void provide_xrm_string(const char *string); /* Function that {gtkapp,gtkmain}.c needs from ux{pterm,putty}.c. Does * early process setup that varies between applications (e.g. diff --git a/unix/uxstore.c b/unix/uxstore.c index c66d92b0..973e4c70 100644 --- a/unix/uxstore.c +++ b/unix/uxstore.c @@ -301,9 +301,10 @@ static int keycmp(void *av, void *bv) return strcmp(a->key, b->key); } -void provide_xrm_string(char *string) +void provide_xrm_string(const char *string) { - char *p, *q, *key; + const char *p, *q; + char *key; struct skeyval *xrms, *ret; p = q = strchr(string, ':');