*/
static int __config_iteration(const char* key, const char* value)
{
- const int prefix_len = strlen("limiter|");
+ const int prefix_len = sizeof("limiter|") - 1;
char * delimiter_pos;
char limiter_tag[MAX_CONF_KEY_LEN];
int limit;
pm = entry->message;
if (prefixSuffixIsHeaderFooter) {
- strncat(p, prefixBuf, strlen(prefixBuf));
+ strncat(p, prefixBuf, prefixLen);
p += prefixLen;
strncat(p, entry->message, entry->messageLen);
p += entry->messageLen;
- strncat(p, suffixBuf, strlen(suffixBuf));
+ strncat(p, suffixBuf, suffixLen);
p += suffixLen;
} else {
while (pm < (entry->message + entry->messageLen)) {
&& *pm != '\n') pm++;
lineLen = pm - lineStart;
- strncat(p, prefixBuf, strlen(prefixBuf));
+ strncat(p, prefixBuf, prefixLen);
p += prefixLen;
strncat(p, lineStart, lineLen);
p += lineLen;
- strncat(p, suffixBuf, strlen(suffixBuf));
+ strncat(p, suffixBuf, suffixLen);
p += suffixLen;
if (*pm == '\n')