aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Holstein <nathan.holstein@gmail.com>2015-08-02 12:19:15 -0400
committerNathan Holstein <nathan.holstein@gmail.com>2015-08-05 08:50:20 -0400
commitad270e2f81fedbcef80cecb8be155953bdf5123d (patch)
tree50ea9fdbe1093084800553e14856e6ca446cb685
parent18b4161e2a80d9367477194085d52c61ab6eb5b0 (diff)
downloadopendoas-ad270e2f81fedbcef80cecb8be155953bdf5123d.tar.gz
Fix a group of sign comparison warnings.
These variables are used as offsets into arrays, and are never set to -1. This commit just propagates the usage of size_t through from arraylen().
-rw-r--r--doas.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/doas.c b/doas.c
index eda11b3..9862520 100644
--- a/doas.c
+++ b/doas.c
@@ -188,10 +188,10 @@ parseconfig(const char *filename, int checkperms)
* Copy the environment variables in safeset from oldenvp to envp.
*/
static int
-copyenvhelper(const char **oldenvp, const char **safeset, int nsafe,
+copyenvhelper(const char **oldenvp, const char **safeset, size_t nsafe,
char **envp, int ei)
{
- int i;
+ size_t i;
for (i = 0; i < nsafe; i++) {
const char **oe = oldenvp;
@@ -224,8 +224,8 @@ copyenv(const char **oldenvp, struct rule *rule)
char **envp;
const char **extra;
int ei;
- int nsafe, nbad;
- int nextras = 0;
+ size_t nsafe, nbad;
+ size_t nextras = 0;
/* if there was no envvar whitelist, pass all except badset ones */
nbad = arraylen(badset);