char *ret;
ret = escape_string(dst, dst + size, '\\', rfc5424_escape_map, src, src + len);
- if (ret == NULL || *ret != '\0')
+ if (ret == NULL)
return NULL;
len = ret - dst;
}
if (s->req_cap[hdr] != NULL) {
ret = lf_encode_string(tmplog, dst + maxsize,
'#', hdr_encode_map, s->req_cap[hdr], tmp);
- if (ret == NULL || *ret != '\0')
+ if (ret == NULL)
goto out;
tmplog = ret;
}
if (s->req_cap[hdr] != NULL) {
ret = lf_encode_string(tmplog, dst + maxsize,
'#', hdr_encode_map, s->req_cap[hdr], tmp);
- if (ret == NULL || *ret != '\0')
+ if (ret == NULL)
goto out;
tmplog = ret;
} else if (!(tmp->options & LOG_OPT_QUOTE))
if (s->res_cap[hdr] != NULL) {
ret = lf_encode_string(tmplog, dst + maxsize,
'#', hdr_encode_map, s->res_cap[hdr], tmp);
- if (ret == NULL || *ret != '\0')
+ if (ret == NULL)
goto out;
tmplog = ret;
}
if (s->res_cap[hdr] != NULL) {
ret = lf_encode_string(tmplog, dst + maxsize,
'#', hdr_encode_map, s->res_cap[hdr], tmp);
- if (ret == NULL || *ret != '\0')
+ if (ret == NULL)
goto out;
tmplog = ret;
} else if (!(tmp->options & LOG_OPT_QUOTE))
uri = txn && txn->uri ? txn->uri : "<BADREQ>";
ret = lf_encode_string(tmplog, dst + maxsize,
'#', url_encode_map, uri, tmp);
- if (ret == NULL || *ret != '\0')
+ if (ret == NULL)
goto out;
tmplog = ret;
break;
}
ret = lf_encode_chunk(tmplog, dst + maxsize, '#', url_encode_map, &chunk, tmp);
- if (ret == NULL || *ret != '\0')
+ if (ret == NULL)
goto out;
tmplog = ret;
}
ret = lf_encode_chunk(tmplog, dst + maxsize, '#', url_encode_map, &chunk, tmp);
- if (ret == NULL || *ret != '\0')
+ if (ret == NULL)
goto out;
tmplog = ret;
}
ret = lf_encode_chunk(tmplog, dst + maxsize, '#', url_encode_map, &chunk, tmp);
- if (ret == NULL || *ret != '\0')
+ if (ret == NULL)
goto out;
tmplog = ret;
}
ret = lf_encode_chunk(tmplog, dst + maxsize, '#', url_encode_map, &chunk, tmp);
- if (ret == NULL || *ret != '\0')
+ if (ret == NULL)
goto out;
tmplog = ret;
}
ret = lf_encode_chunk(tmplog, dst + maxsize, '#', url_encode_map, &chunk, tmp);
- if (ret == NULL || *ret != '\0')
+ if (ret == NULL)
goto out;
tmplog = ret;
}
ret = lf_encode_chunk(tmplog, dst + maxsize, '#', url_encode_map, &chunk, tmp);
- if (ret == NULL || *ret != '\0')
+ if (ret == NULL)
goto out;
tmplog = ret;