fix for old compilers

This commit is contained in:
netblue30 2023-04-06 15:53:27 -04:00
parent 2df5e23d79
commit ba00d135fe
2 changed files with 4 additions and 2 deletions

View file

@ -279,7 +279,8 @@ static void env_apply_list(const char * const *list, unsigned int num_items) {
while (env) {
if (env->op == SETENV) {
for (unsigned int i = 0; i < num_items; i++)
unsigned int i;
for (i = 0; i < num_items; i++)
if (strcmp(env->name, list[i]) == 0) {
// sanity check for whitelisted environment variables
if (strlen(env->name) + strlen(env->value) >= MAX_ENV_LEN) {

View file

@ -56,7 +56,8 @@ long long unsigned parse_arg_size(char *str) {
}
/* checks for is value valid positive number */
for (int i = 0; i < len; i++) {
int i;
for (i = 0; i < len; i++) {
if (!isdigit(*(str+i))) {
return 0;
}