utils: add noalloc flag to modifyString()

This should make it more straightforward for code analyzers to
tell if the function is going to allocate memory.
This commit is contained in:
Justin Maggard
2014-04-18 15:18:44 -07:00
parent b0550495e8
commit 331d484555
5 changed files with 32 additions and 24 deletions

View File

@ -60,7 +60,7 @@ int ends_with(const char * haystack, const char * needle);
char *trim(char *str);
char *strstrc(const char *s, const char *p, const char t);
char *strcasestrc(const char *s, const char *p, const char t);
char *modifyString(char * string, const char * before, const char * after);
char *modifyString(char *string, const char *before, const char *after, int noalloc);
char *escape_tag(const char *tag, int force_alloc);
char *unescape_tag(const char *tag, int force_alloc);
void strip_ext(char * name);