chiark / gitweb /
install, cgtop: adjust hashmap_move_one() callers for -ENOMEM possibility
authorMichal Schmidt <mschmidt@redhat.com>
Sat, 4 Oct 2014 19:29:10 +0000 (21:29 +0200)
committerMichal Schmidt <mschmidt@redhat.com>
Thu, 23 Oct 2014 15:38:02 +0000 (17:38 +0200)
commit2d5c93c7af05bfa25cad85909acdb7b0bfc3f4e1
treed0413c10f0e323cb9d3e338a9e15770c95e2c856
parent8f88aed740ded77af443bb1b7c79bb229b50f8f8
install, cgtop: adjust hashmap_move_one() callers for -ENOMEM possibility

That hashmap_move_one() currently cannot fail with -ENOMEM is an
implementation detail, which is not possible to guarantee in general.
Hashmap implementations based on anything else than chaining of
individual entries may have to allocate.

hashmap_move_one will not fail with -ENOMEM if a proper reservation has
been made beforehand. Use reservations in install.c.

In cgtop.c simply propagate the error instead of asserting.
src/cgtop/cgtop.c
src/shared/install.c