From 54979a7b81a397eca8438d3def2a0fe5b19825e0 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 12 Mar 2017 13:24:30 +0000 Subject: Fix a few omissions --- src/libexecline/exlp.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/libexecline/exlp.c') diff --git a/src/libexecline/exlp.c b/src/libexecline/exlp.c index 5e323a9..1fae415 100644 --- a/src/libexecline/exlp.c +++ b/src/libexecline/exlp.c @@ -1,7 +1,6 @@ /* ISC license. */ -#include -#include +#include #include #include #include @@ -42,7 +41,7 @@ int exlp (unsigned int nmin, char const *const *envp, exlsn_t *info) blah.value = info->values.len ; blah.n = 1 ; if (!stralloc_catb(&info->vars, "#\0@", 4) - || !stralloc_catb(&info->values, x, str_len(x) + 1) + || !stralloc_catb(&info->values, x, strlen(x) + 1) || !genalloc_append(elsubst_t, &info->data, &blah)) goto err ; ntot = n > nmin ? n : nmin ; poszero = info->values.len ; @@ -58,11 +57,11 @@ int exlp (unsigned int nmin, char const *const *envp, exlsn_t *info) blah.value = info->values.len ; blah.n = 1 ; if (!stralloc_catb(&info->vars, fmt, l+1) - || !stralloc_catb(&info->values, x, str_len(x) + 1) + || !stralloc_catb(&info->values, x, strlen(x) + 1) || !genalloc_append(elsubst_t, &info->data, &blah)) goto err ; } blah.var = varbase + 2 ; - blah.value = poszero + str_len(info->values.s + poszero) + 1 ; + blah.value = poszero + strlen(info->values.s + poszero) + 1 ; blah.n = n ; if (!genalloc_append(elsubst_t, &info->data, &blah)) goto err ; return n ; -- cgit v1.2.3