summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/execline/emptyenv.c1
-rw-r--r--src/execline/if.c1
-rw-r--r--src/execline/trap.c1
-rw-r--r--src/libexecline/el_popenv.c7
-rw-r--r--src/libexecline/el_pushenv.c6
5 files changed, 9 insertions, 7 deletions
diff --git a/src/execline/emptyenv.c b/src/execline/emptyenv.c
index 658276e..2a6bc0d 100644
--- a/src/execline/emptyenv.c
+++ b/src/execline/emptyenv.c
@@ -1,6 +1,7 @@
/* ISC license. */
#include <string.h>
+#include <skalibs/bytestr.h>
#include <skalibs/sgetopt.h>
#include <skalibs/strerr2.h>
#include <skalibs/stralloc.h>
diff --git a/src/execline/if.c b/src/execline/if.c
index 3e34c36..012d9f2 100644
--- a/src/execline/if.c
+++ b/src/execline/if.c
@@ -5,7 +5,6 @@
#include <skalibs/types.h>
#include <skalibs/strerr2.h>
#include <skalibs/djbunix.h>
-#include <skalibs/ushort.h>
#include <execline/execline.h>
#define USAGE "if [ -n ] [ -X ] [ -t | -x exitcode ] { command... }"
diff --git a/src/execline/trap.c b/src/execline/trap.c
index 6a43424..79a00ff 100644
--- a/src/execline/trap.c
+++ b/src/execline/trap.c
@@ -1,6 +1,7 @@
/* ISC license. */
#include <string.h>
+#include <strings.h>
#include <errno.h>
#include <signal.h>
#include <skalibs/sgetopt.h>
diff --git a/src/libexecline/el_popenv.c b/src/libexecline/el_popenv.c
index eff82cc..fd8309b 100644
--- a/src/libexecline/el_popenv.c
+++ b/src/libexecline/el_popenv.c
@@ -13,7 +13,8 @@ int el_popenv (stralloc *sa, char const *const *envp, size_t envlen, char const
int count = 0 ;
for (; i < envlen ; i++)
{
- size_t equal, colon, n, j = 0 ;
+ size_t equal, colon, j = 0 ;
+ unsigned int n ;
for (; j < listlen ; j++) if (str_start(envp[i], list[j])) break ;
if (j == listlen) goto copyit ;
j = strlen(list[j]) ;
@@ -27,8 +28,8 @@ int el_popenv (stralloc *sa, char const *const *envp, size_t envlen, char const
if (n > 1)
{
char fmt[UINT_FMT+1] = ":" ;
- n = 1 + uint_fmt(fmt+1, n-1) ;
- if (!stralloc_catb(sa, fmt, n)) goto err ;
+ j = 1 + uint_fmt(fmt+1, n-1) ;
+ if (!stralloc_catb(sa, fmt, j)) goto err ;
}
if (!stralloc_catb(sa, envp[i] + equal, strlen(envp[i] + equal) + 1)) goto err ;
continue ;
diff --git a/src/libexecline/el_pushenv.c b/src/libexecline/el_pushenv.c
index 9af5ec5..6cc5650 100644
--- a/src/libexecline/el_pushenv.c
+++ b/src/libexecline/el_pushenv.c
@@ -28,12 +28,12 @@ int el_pushenv (stralloc *sa, char const *const *envp, size_t envlen, char const
}
else
{
- size_t n ;
+ unsigned int n ;
char fmt[UINT_FMT+1] = ":" ;
if (colon + 1 + uint_scan(envp[i] + colon + 1, &n) != equal) goto copyit ;
- n = 1 + uint_fmt(fmt+1, n+1) ;
+ j = 1 + uint_fmt(fmt+1, n+1) ;
if (!stralloc_catb(sa, envp[i], colon)) goto err ;
- if (!stralloc_catb(sa, fmt, n)) goto err ;
+ if (!stralloc_catb(sa, fmt, j)) goto err ;
}
if (!stralloc_catb(sa, envp[i] + equal, strlen(envp[i] + equal) + 1)) goto err ;
continue ;