return 1;
}
-/* appends <nb> characters from str after <chk>.
- * Returns 0 in case of failure.
- */
-static inline int chunk_strncat(struct buffer *chk, const char *str, int nb)
-{
- return chunk_memcat(chk, str, nb);
-}
-
/* Adds a trailing zero to the current chunk and returns the pointer to the
* following part. The purpose is to be able to use a chunk as a series of
* short independent strings with chunk_* functions, which do not need to be
if (value) {
struct buffer *chk = get_trash_chunk();
- chunk_strncat(chk, value, ctx.value.len - 8 + 1);
- chunk_strncat(chk, "", 1);
+ chunk_memcat(chk, value, ctx.value.len - 8 + 1);
+ chunk_memcat(chk, "", 1);
offset = (*chk->area == '"') ? 1 : 0;
smaxage = strtol(chk->area + offset, &endptr, 10);
if (unlikely(smaxage < 0 || endptr == chk->area))
if (value) {
struct buffer *chk = get_trash_chunk();
- chunk_strncat(chk, value, ctx.value.len - 7 + 1);
- chunk_strncat(chk, "", 1);
+ chunk_memcat(chk, value, ctx.value.len - 7 + 1);
+ chunk_memcat(chk, "", 1);
offset = (*chk->area == '"') ? 1 : 0;
maxage = strtol(chk->area + offset, &endptr, 10);
if (unlikely(maxage < 0 || endptr == chk->area))