diff options
Diffstat (limited to 'dynstr.c')
-rw-r--r-- | dynstr.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -209,7 +209,13 @@ Dynstr *dynstr_substr(Dynstr *dynstr, size_t offset, size_t size) } -Dynstr *dynstr_cat(Dynstr *dynstr, ...) +Dynstr *dynstr_cat(Dynstr *dynstr1, Dynstr *dynstr2) +{ + return dynstr_cat_many(dynstr1, dynstr2, (Dynstr *) NULL); +} + + +Dynstr *dynstr_cat_many(Dynstr *dynstr, ...) { va_list args; Dynstr *result; @@ -446,7 +452,7 @@ static Dynstr *readline_helper(int (*callback)(FILE *, int), FILE *f, int fd) temp1 = dynstr_new_from_constant_memory(buf, buflen); if (temp1 == NULL) goto error; - temp2 = dynstr_cat(line, temp1, (void *) NULL); + temp2 = dynstr_cat(line, temp1); if (temp2 == NULL) goto error; dynstr_free(temp1); @@ -463,7 +469,7 @@ static Dynstr *readline_helper(int (*callback)(FILE *, int), FILE *f, int fd) temp1 = dynstr_new_from_constant_memory(buf, buflen); if (temp1 == NULL) goto error; - temp2 = dynstr_cat(line, temp1, (void *) NULL); + temp2 = dynstr_cat(line, temp1); if (temp2 == NULL) goto error; dynstr_free(temp1); |