Support "constipation" -- compile cleanly with -Wwrite-strings

This commit is contained in:
hpa 2001-08-10 18:25:08 +00:00
parent 9b5b8c5640
commit 5b0cb11445
5 changed files with 62 additions and 46 deletions

View file

@ -42,7 +42,7 @@ struct rule {
int nrule;
int rule_flags;
regex_t rx;
char *pattern;
const char *pattern;
};
/* Do \-substitution. Call with string == NULL to get length only. */
@ -251,7 +251,7 @@ void freerules(struct rule *r)
/* "" patterns aren't allocated by malloc() */
if ( r->pattern && *r->pattern )
free(r->pattern);
free((void *)r->pattern);
free(r);