* Fix some issues reported by cppcheck.

This commit is contained in:
Justin Maggard
2011-05-02 23:50:52 +00:00
parent e0e0fa254d
commit 9a9270cecf
18 changed files with 298 additions and 282 deletions

View File

@ -100,7 +100,12 @@ modifyString(char * string, const char * before, const char * after, short like)
chgcnt++;
s = p+oldlen;
}
string = realloc(string, strlen(string)+((newlen-oldlen)*chgcnt)+1+like);
s = realloc(string, strlen(string)+((newlen-oldlen)*chgcnt)+1+like);
/* If we failed to realloc, return the original alloc'd string */
if( s )
string = s;
else
return string;
}
s = string;
@ -136,7 +141,7 @@ modifyString(char * string, const char * before, const char * after, short like)
}
char *
escape_tag(const char *tag, uint8_t force_alloc)
escape_tag(const char *tag, int force_alloc)
{
char *esc_tag = NULL;