static int bus_socket_inotify_setup(sd_bus *b) {
_cleanup_free_ int *new_watches = NULL;
_cleanup_free_ char *absolute = NULL;
- size_t n_allocated = 0, n = 0, done = 0, i;
+ size_t n = 0, done = 0, i;
unsigned max_follow = 32;
const char *p;
int wd, r;
* that exists we want to know when files are created or moved into it. For all parents of it we just care if
* they are removed or renamed. */
- if (!GREEDY_REALLOC(new_watches, n_allocated, n + 1)) {
+ if (!GREEDY_REALLOC(new_watches, n + 1)) {
r = -ENOMEM;
goto fail;
}
goto fail;
}
- if (!GREEDY_REALLOC(new_watches, n_allocated, n + 1)) {
+ if (!GREEDY_REALLOC(new_watches, n + 1)) {
r = -ENOMEM;
goto fail;
}