summaryrefslogtreecommitdiff
path: root/src/libexecline/exlp.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-03-12 13:24:30 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-03-12 13:24:30 +0000
commit54979a7b81a397eca8438d3def2a0fe5b19825e0 (patch)
tree4dac9941e6bca1d693cfb9c0388abdb96e202fcb /src/libexecline/exlp.c
parent10cb49f302ab1084c5b86d4c47da17d8abf09159 (diff)
downloadexecline-54979a7b81a397eca8438d3def2a0fe5b19825e0.tar.xz
Fix a few omissions
Diffstat (limited to 'src/libexecline/exlp.c')
-rw-r--r--src/libexecline/exlp.c9
1 files changed, 4 insertions, 5 deletions
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 <sys/types.h>
-#include <skalibs/bytestr.h>
+#include <string.h>
#include <skalibs/env.h>
#include <skalibs/strerr2.h>
#include <skalibs/stralloc.h>
@@ -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 ;