5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen This file is part of systemd
5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen Copyright 2015 Tom Gundersen
5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen systemd is free software; you can redistribute it and/or modify it
5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen under the terms of the GNU Lesser General Public License as published by
5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen the Free Software Foundation; either version 2.1 of the License, or
5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen (at your option) any later version.
5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen systemd is distributed in the hope that it will be useful, but
5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen WITHOUT ANY WARRANTY; without even the implied warranty of
5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen Lesser General Public License for more details.
5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen You should have received a copy of the GNU Lesser General Public License
5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen along with systemd; If not, see <http://www.gnu.org/licenses/>.
d5fa81995849cb263ecfcd0aa6ab661360d9213eMartin Mikkelsen _cleanup_bitmap_free_ Bitmap *b = NULL, *b2 = NULL;
5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen unsigned n = (unsigned) -1, i = 0;
5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen else if (i == 1)
5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen else if (i == 256)
5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen i = (unsigned) -1;
5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen else if (i == 1)
5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen else if (i == 256)
5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen i = (unsigned) -1;
5ffa42cb8028833440040c2e240e0d788f11c112Tom Gundersen assert_se(bitmap_set(b, (unsigned) -1) == -ERANGE);
d5fa81995849cb263ecfcd0aa6ab661360d9213eMartin Mikkelsen assert_se(bitmap_ensure_allocated(&b) == 0);