diff options
Diffstat (limited to 'src/strv.c')
-rw-r--r-- | src/strv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/strv.c b/src/strv.c index 71b77c9bbf..f15aa8736a 100644 --- a/src/strv.c +++ b/src/strv.c @@ -67,11 +67,11 @@ void strv_free(char **l) { char **strv_copy(char **l) { char **r, **k; - if (!(r = new(char*, strv_length(l)+1))) + if (!(k = r = new(char*, strv_length(l)+1))) return NULL; if (l) - for (k = r; *l; k++, l++) + for (; *l; k++, l++) if (!(*k = strdup(*l))) goto fail; |