#define USE_THE_REPOSITORY_VARIABLE
-#define DISABLE_SIGN_COMPARE_WARNINGS
#include "git-compat-util.h"
#include "abspath.h"
return 0;
}
-static int max_connections = 32;
-
+static unsigned int max_connections = 32;
static unsigned int live_children;
static struct child {
continue;
}
if (skip_prefix(arg, "--max-connections=", &v)) {
- if (strtol_i(v, 10, &max_connections))
+ int parsed_value;
+ if (strtol_i(v, 10, &parsed_value))
die(_("invalid max-connections '%s', expecting an integer"), v);
- if (max_connections < 0)
- max_connections = 0; /* unlimited */
+ /* A negative value indicates unlimited children. */
+ max_connections = parsed_value < 0 ? 0 : parsed_value;
continue;
}
if (!strcmp(arg, "--strict-paths")) {