commit - e99e2d157170987cd8665508a0adcbec58d040b6
commit + 16aeacf7088dcd3cd5e654af46a3015cecf41426
blob - 0526cfdab94262bbc3d44a427af97d56d5deb7b8
blob + 861cb6f29586892ef12113a5db50c7e4329eb9e0
--- lib/diff3.c
+++ lib/diff3.c
char *dp13, *dp23, *path1, *path2, *path3;
BUF *b1, *b2, *b3, *d1, *d2, *diffb;
u_char *data, *patch;
- size_t dlen, plen;
+ size_t dlen, plen, i;
struct diff3_state *d3s;
- int i;
*overlapcnt = 0;
blob - 92ce7a5fda79f0688485a4cd32be5ec5fd2dfa64
blob + 6cbb7ca6b8a72218dbc5725fed24856910329b8f
--- lib/error.c
+++ lib/error.c
const struct got_error *
got_error(int code)
{
- int i;
+ size_t i;
for (i = 0; i < nitems(got_errors); i++) {
if (code == got_errors[i].code)
got_error_msg(int code, const char *msg)
{
static struct got_error err;
- int i;
+ size_t i;
for (i = 0; i < nitems(got_errors); i++) {
if (code == got_errors[i].code) {
{
static struct got_error err;
static char msg[PATH_MAX + 128];
- int i;
+ size_t i;
for (i = 0; i < nitems(got_errors); i++) {
if (code == got_errors[i].code) {
blob - 718d9571c10a58194bf79eb95828d68e66053da6
blob + 91dc86ae797191eff2211c2555318120b1dcbbff
--- lib/fetch.c
+++ lib/fetch.c
int fetchfd, struct got_repository *repo,
got_fetch_progress_cb progress_cb, void *progress_arg)
{
+ size_t i;
int imsg_fetchfds[2], imsg_idxfds[2];
int packfd = -1, npackfd = -1, idxfd = -1, nidxfd = -1, nfetchfd = -1;
- int tmpfds[3], i;
+ int tmpfds[3];
int fetchstatus, idxstatus, done = 0;
const struct got_error *err;
struct imsgbuf fetchibuf, idxibuf;
blob - 69956c3e9633b8b589dac03f893ff441190025d1
blob + c4d930baadc3304783bc427af25900e6765fd933
--- lib/gitconfig.c
+++ lib/gitconfig.c
const struct got_error *
got_gitconfig_open(struct got_gitconfig **conf, int fd)
{
- unsigned int i;
+ size_t i;
*conf = calloc(1, sizeof(**conf));
if (*conf == NULL)
conf_clear(struct got_gitconfig *conf)
{
struct got_gitconfig_binding *cb;
- int i;
+ size_t i;
if (conf->addr) {
for (i = 0; i < nitems(conf->bindings); i++)
struct got_gitconfig_list *list = NULL;
struct got_gitconfig_list_node *node = 0;
struct got_gitconfig_binding *cb;
- int i;
+ size_t i;
*sections = NULL;
blob - 2428cdcd39afb48683eba7e9096828a0245b75ca
blob + 87a2ed47fc53ce199f828d6f49ba4cd304e3b52f
--- lib/object_parse.c
+++ lib/object_parse.c
};
int type = 0;
size_t size = 0, hdrlen = 0;
- int i;
+ size_t i;
*obj = NULL;
blob - 55eb3a41d0b6ef47b2e286aa578da8cb73c0e2f7
blob + a17a8788d58b000507ac5d3d079dfaba0fe6ac2d
--- lib/privsep.c
+++ lib/privsep.c
GOT_PATH_PROG_FETCH_PACK,
GOT_PATH_PROG_INDEX_PACK,
};
- int i;
+ size_t i;
for (i = 0; i < nitems(helpers); i++) {
if (unveil(helpers[i], "x") == 0)
blob - 6df30b62bbfe8cebeb316e89734855cc1cedd6dc
blob + ef042bcbd8a8763b42a65397975a53c336f74544
--- lib/reference.c
+++ lib/reference.c
const char *forbidden_seq[] = { "//", "..", "@{" };
const char *lfs = GOT_LOCKFILE_SUFFIX;
const size_t lfs_len = sizeof(GOT_LOCKFILE_SUFFIX) - 1;
- int i;
+ size_t i;
if (name[0] == '@' && name[1] == '\0')
return 0;
const char *subdirs[] = {
GOT_REF_HEADS, GOT_REF_TAGS, GOT_REF_REMOTES
};
- int i, well_known = is_well_known_ref(refname);
+ size_t i;
+ int well_known = is_well_known_ref(refname);
struct got_lockfile *lf = NULL;
*ref = NULL;
blob - dfc1bf52869052e48db54b0fa8404e5c7f6b873d
blob + d5c352fa14553107e5f6733cdfc9eba3f79b7baf
--- lib/repository.c
+++ lib/repository.c
struct got_repository *repo = NULL;
const struct got_error *err = NULL;
char *abspath, *repo_path = NULL;
- int i;
+ size_t i;
*repop = NULL;
got_repo_close(struct got_repository *repo)
{
const struct got_error *err = NULL, *child_err;
- int i;
+ size_t i;
for (i = 0; i < nitems(repo->packidx_cache); i++) {
if (repo->packidx_cache[i] == NULL)
const char *path_packidx)
{
const struct got_error *err = NULL;
- int i;
+ size_t i;
for (i = 0; i < nitems(repo->packidx_cache); i++) {
if (repo->packidx_cache[i] == NULL)
DIR *packdir;
struct dirent *dent;
char *path_packidx;
- int i;
+ size_t i;
/* Search pack index cache. */
for (i = 0; i < nitems(repo->packidx_cache); i++) {
const struct got_error *err = NULL;
struct got_pack *pack = NULL;
struct stat sb;
- int i;
+ size_t i;
if (packp)
*packp = NULL;
got_repo_get_cached_pack(struct got_repository *repo, const char *path_packfile)
{
struct got_pack *pack = NULL;
- int i;
+ size_t i;
for (i = 0; i < nitems(repo->packs); i++) {
pack = &repo->packs[i];
"\tfilemode = true\n"
"\tbare = true\n";
char *path;
- int i;
+ size_t i;
if (!got_path_dir_is_empty(repo_path))
return got_error(GOT_ERR_DIR_NOT_EMPTY);