X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcgtop%2Fcgtop.c;h=932a7ba7c6c360c8bf5d1c2ad8842d7f47e0c21b;hb=31cf921abbeafc9dae2d5c777f3e2285e6f4c19d;hp=509fe4cdc8341a89155494ffdb37ce39cb923221;hpb=601185b43da638b1c74153deae01dbd518680889;p=elogind.git diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c index 509fe4cdc..932a7ba7c 100644 --- a/src/cgtop/cgtop.c +++ b/src/cgtop/cgtop.c @@ -126,7 +126,9 @@ static int process(const char *controller, const char *path, Hashmap *a, Hashmap return r; } } else { - assert_se(hashmap_move_one(a, b, path) == 0); + r = hashmap_move_one(a, b, path); + if (r < 0) + return r; g->cpu_valid = g->memory_valid = g->io_valid = g->n_tasks_valid = false; } } @@ -695,8 +697,8 @@ int main(int argc, char *argv[]) { if (r <= 0) goto finish; - a = hashmap_new(string_hash_func, string_compare_func); - b = hashmap_new(string_hash_func, string_compare_func); + a = hashmap_new(&string_hash_ops); + b = hashmap_new(&string_hash_ops); if (!a || !b) { r = log_oom(); goto finish;