diff options
Diffstat (limited to 'lib/bitfield.h')
| -rw-r--r-- | lib/bitfield.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/bitfield.h b/lib/bitfield.h index b3f40a948b..7062796a99 100644 --- a/lib/bitfield.h +++ b/lib/bitfield.h @@ -1,3 +1,23 @@ +/* Bitfields + * Copyright (C) 2016 Cumulus Networks, Inc. + * + * This file is part of Quagga. + * + * Quagga is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * Quagga is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Quagga; see the file COPYING. If not, write to the Free + * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + */ /** * A simple bit array implementation to allocate and free IDs. An example * of its usage is in allocating link state IDs for OSPFv3 as OSPFv3 has @@ -86,7 +106,7 @@ typedef unsigned int word_t; /* Find a clear bit in v and assign it to b. */ #define bf_find_bit(v, b) \ do { \ - word_t word; \ + word_t word = 0; \ unsigned int w, sh; \ for (w = 0; w <= (v).n; w++) { \ if ((word = (v).data[w]) != WORD_MAX) break; \ |
