]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/bitmap.c
bitmap: various clean-ups 687/head
authorLennart Poettering <lennart@poettering.net>
Thu, 23 Jul 2015 13:57:54 +0000 (15:57 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 23 Jul 2015 13:57:54 +0000 (15:57 +0200)
commit370a2172ac0f455863a1ac8e7a9b0a284d810fd4
treea1f89d9d1b471eaca3525c0da7934f6ebb95a3d9
parentb96c778a00555962e0f9233032f090d0d267c31a
bitmap: various clean-ups

a) use memcmp() to compare bitmaps efficiently

b) use UINT64_C() macro instead of ULL suffixes to get right suffix for
   uint64_t constants

c) add a few assert()s

d) when comparing integers with 0 we generally try to make this explicit
   with "!= 0".

e) remove redundant bitmap_isset() if check, as we don't have it in
   bitmap_isset() either.

f) It should be fine to invoke bitmap_unset() on a NULL bitmap
src/basic/bitmap.c