Martin Mikkelsen 951c3eefac bitmap: make bitmap_clear free the bitmap array
Given two bitmaps and the following code:

  Bitmap *a = bitmap_new(), *b = bitmap_new();
  bitmap_set(a, 1);
  bitmap_clear(a);
  bitmap_set(a, 0);
  bitmap_set(b, 0);

These two bitmaps should now have the same bits set and they should be
equal but bitmap_equal() will return false in this case because while
bitmap_clear() resets the number of elements in the array it does not
clear the array and bitmap_set() expects the array to be cleared.
GREEDY_REALLOC0 looks at the allocated size and not the actual size so
it does not clear any memory.

Fix this by freeing the allocated memory and resetting the whole Bitmap
to an initial state in bitmap_clear().

This also adds test code for this issue.
2015-07-31 19:08:26 +02:00
2015-06-15 00:13:43 +03:00
2015-07-06 17:47:38 +02:00
2015-06-03 00:22:53 +02:00
2015-06-19 12:47:39 +02:00
2015-07-27 20:15:34 +02:00
2015-07-27 20:15:34 +02:00
2015-06-03 00:22:53 +02:00
2015-07-27 20:15:34 +02:00
2015-07-29 15:25:45 +02:00
2015-07-28 00:07:32 +02:00

systemd - System and Service Manager

Build Status
Coverity Scan Status

Details

  • General information about systemd can be found in the systemd Wiki
  • Information about build requirements are provided in the README file
Description
No description provided
Readme 321 MiB
Languages
C 89%
Python 5.1%
Shell 4.5%
Meson 1.2%