@@ -1764,7 +1764,7 @@ static bool same_stat_id(const struct stat *a, const struct stat *b)
static void coroutine_fn v9fs_walk(void *opaque)
{
- int name_idx;
+ int name_idx, nwalked;
g_autofree V9fsQID *qids = NULL;
int i, err = 0;
V9fsPath dpath, path;
@@ -1842,17 +1842,17 @@ static void coroutine_fn v9fs_walk(void *opaque)
break;
}
stbuf = fidst;
- for (name_idx = 0; name_idx < nwnames; name_idx++) {
+ for (nwalked = 0; nwalked < nwnames; nwalked++) {
if (v9fs_request_cancelled(pdu)) {
err = -EINTR;
break;
}
if (!same_stat_id(&pdu->s->root_st, &stbuf) ||
- strcmp("..", wnames[name_idx].data))
+ strcmp("..", wnames[nwalked].data))
{
err = s->ops->name_to_path(&s->ctx, &dpath,
- wnames[name_idx].data,
- &pathes[name_idx]);
+ wnames[nwalked].data,
+ &pathes[nwalked]);
if (err < 0) {
err = -errno;
break;
@@ -1861,13 +1861,13 @@ static void coroutine_fn v9fs_walk(void *opaque)
err = -EINTR;
break;
}
- err = s->ops->lstat(&s->ctx, &pathes[name_idx], &stbuf);
+ err = s->ops->lstat(&s->ctx, &pathes[nwalked], &stbuf);
if (err < 0) {
err = -errno;
break;
}
- stbufs[name_idx] = stbuf;
- v9fs_path_copy(&dpath, &pathes[name_idx]);
+ stbufs[nwalked] = stbuf;
+ v9fs_path_copy(&dpath, &pathes[nwalked]);
}
}
});