summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libpiano/xml.c7
-rw-r--r--src/ui_dispatch.h4
2 files changed, 6 insertions, 5 deletions
diff --git a/src/libpiano/xml.c b/src/libpiano/xml.c
index 1f6eed7..de05122 100644
--- a/src/libpiano/xml.c
+++ b/src/libpiano/xml.c
@@ -691,9 +691,10 @@ PianoReturn_t PianoXmlParseSeedSuggestions (char *xml,
* @return encoded string or NULL
*/
char *PianoXmlEncodeString (const char *s) {
- char *replacements[] = {"&&amp;", "'&apos;", "\"&quot;", "<&lt;",
- ">&gt;", NULL};
- char **r, *sOut, *sOutCurr, found;
+ static const char *replacements[] = {"&&amp;", "'&apos;", "\"&quot;",
+ "<&lt;", ">&gt;", NULL};
+ const char **r;
+ char *sOut, *sOutCurr, found;
if ((sOut = calloc (strlen (s) * 5 + 1, sizeof (*sOut))) == NULL) {
return NULL;
diff --git a/src/ui_dispatch.h b/src/ui_dispatch.h
index b2b5a36..4a5f791 100644
--- a/src/ui_dispatch.h
+++ b/src/ui_dispatch.h
@@ -41,9 +41,9 @@ typedef void (*BarKeyShortcutFunc_t) (BarApp_t *, PianoStation_t *,
typedef struct {
BarUiDispatchContext_t context;
BarKeyShortcutFunc_t function;
- char *helpText;
+ const char * const helpText;
char defaultKey;
- char *configKey;
+ const char * const configKey;
} BarUiDispatchAction_t;
#include "ui_act.h"