commit - fad0fb69c1b7616f933c497887967078ff4dd111
commit + a185ed1ea0aa9e48c5cc2708ee45ef4c80bd4277
blob - b4a0234f60989c1b4841fc215ae5c2dd62dc01f0
blob + 977e533e0ffea9ddfb740d196d9ca8eaf122370d
--- ctl.c
+++ ctl.c
break;
case ADD:
done = 0;
- i = 0;
- for (files = res->files; *files != NULL; ++files) {
+ for (i = 0, files = res->files; files[i] != NULL; ++i) {
memset(&path, 0, sizeof(path));
- if (realpath(*files, path) == NULL) {
- log_warn("realpath %s", *files);
+ if (realpath(files[i], path) == NULL) {
+ log_warn("realpath %s", files[i]);
continue;
}
imsg_compose(ibuf, IMSG_CTL_ADD, 0, 0, -1,
path, sizeof(path));
- i++;
}
ret = i == 0;
break;