}
}
- hashmap_put(s->manager->session_cgroups, s->cgroup_path, s);
+ r = hashmap_put(s->manager->session_cgroups, s->cgroup_path, s);
+ if (r < 0)
+ log_warning("Failed to create mapping between cgroup and session");
return 0;
}
char *p;
struct stat st;
usec_t u, n;
- bool b;
int k;
assert(s);
u = timespec_load(&st.st_atim);
n = now(CLOCK_REALTIME);
- b = u + IDLE_THRESHOLD_USEC < n;
if (t)
- dual_timestamp_from_realtime(t, u + b*IDLE_THRESHOLD_USEC);
+ dual_timestamp_from_realtime(t, u);
- return b;
+ return u + IDLE_THRESHOLD_USEC < n;
dont_know:
if (t)