forked from mirrors/tftp-hpa-google
Support "constipation" -- compile cleanly with -Wwrite-strings
This commit is contained in:
parent
9b5b8c5640
commit
5b0cb11445
5 changed files with 62 additions and 46 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue