diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-03-08 11:29:02 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-03-08 11:29:02 +0000 |
commit | f038f1f2d7fc6d2cbd7ba49fe2b6dba6f9a72fc1 (patch) | |
tree | efd0330ac0c3558111879d72188b49d64d65d3cb /src/libexecline | |
parent | e5d4b64f13683c30ccdd333260febd57d2cdc2d7 (diff) | |
download | execline-f038f1f2d7fc6d2cbd7ba49fe2b6dba6f9a72fc1.tar.xz |
Make it build with skalibs 2.5.0.0
Diffstat (limited to 'src/libexecline')
-rw-r--r-- | src/libexecline/el_popenv.c | 7 | ||||
-rw-r--r-- | src/libexecline/el_pushenv.c | 6 |
2 files changed, 7 insertions, 6 deletions
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 ; |