diff options
Diffstat (limited to 'src/libexecline/el_popenv.c')
-rw-r--r-- | src/libexecline/el_popenv.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libexecline/el_popenv.c b/src/libexecline/el_popenv.c index c0089d0..eff82cc 100644 --- a/src/libexecline/el_popenv.c +++ b/src/libexecline/el_popenv.c @@ -1,10 +1,10 @@ /* ISC license. */ -#include <sys/types.h> +#include <string.h> #include <errno.h> #include <skalibs/bytestr.h> #include <skalibs/stralloc.h> -#include <skalibs/uint.h> +#include <skalibs/types.h> #include <execline/execline.h> int el_popenv (stralloc *sa, char const *const *envp, size_t envlen, char const *const *list, size_t listlen) @@ -16,7 +16,7 @@ int el_popenv (stralloc *sa, char const *const *envp, size_t envlen, char const size_t equal, colon, n, j = 0 ; for (; j < listlen ; j++) if (str_start(envp[i], list[j])) break ; if (j == listlen) goto copyit ; - j = str_len(list[j]) ; + j = strlen(list[j]) ; colon = j + str_chr(envp[i] + j, ':') ; equal = j + str_chr(envp[i] + j, '=') ; if (!envp[i][equal]) goto badenv ; @@ -30,10 +30,10 @@ int el_popenv (stralloc *sa, char const *const *envp, size_t envlen, char const n = 1 + uint_fmt(fmt+1, n-1) ; if (!stralloc_catb(sa, fmt, n)) goto err ; } - if (!stralloc_catb(sa, envp[i] + equal, str_len(envp[i] + equal) + 1)) goto err ; + if (!stralloc_catb(sa, envp[i] + equal, strlen(envp[i] + equal) + 1)) goto err ; continue ; copyit: - if (!stralloc_catb(sa, envp[i], str_len(envp[i]) + 1)) goto err ; + if (!stralloc_catb(sa, envp[i], strlen(envp[i]) + 1)) goto err ; } return count ; |