From ad270e2f81fedbcef80cecb8be155953bdf5123d Mon Sep 17 00:00:00 2001 From: Nathan Holstein Date: Sun, 2 Aug 2015 12:19:15 -0400 Subject: [PATCH] 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(). --- doas.c | 8 ++++---- 1 file 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); -- 2.39.2