mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Minor code cleanups
This commit is contained in:
16
lib/buffer.h
16
lib/buffer.h
@@ -1,3 +1,17 @@
|
||||
/*
|
||||
* BIRD Library -- Generic Buffer Structure
|
||||
*
|
||||
* (c) 2013 Ondrej Zajicek <santiago@crfreenet.org>
|
||||
* (c) 2013 CZ.NIC z.s.p.o.
|
||||
*
|
||||
* Can be freely distributed and used under the terms of the GNU GPL.
|
||||
*/
|
||||
|
||||
#ifndef _BIRD_BUFFER_H_
|
||||
#define _BIRD_BUFFER_H_
|
||||
|
||||
#include "lib/resource.h"
|
||||
#include "sysdep/config.h"
|
||||
|
||||
#define BUFFER(type) struct { type *data; uint used, size; }
|
||||
|
||||
@@ -32,4 +46,4 @@
|
||||
|
||||
#define BUFFER_FLUSH(v) ({ (v).used = 0; })
|
||||
|
||||
|
||||
#endif /* _BIRD_BUFFER_H_ */
|
||||
|
||||
11
lib/hash.h
11
lib/hash.h
@@ -1,4 +1,14 @@
|
||||
/*
|
||||
* BIRD Library -- Generic Hash Table
|
||||
*
|
||||
* (c) 2013 Ondrej Zajicek <santiago@crfreenet.org>
|
||||
* (c) 2013 CZ.NIC z.s.p.o.
|
||||
*
|
||||
* Can be freely distributed and used under the terms of the GNU GPL.
|
||||
*/
|
||||
|
||||
#ifndef _BIRD_HASH_H_
|
||||
#define _BIRD_HASH_H_
|
||||
|
||||
#define HASH(type) struct { type **data; uint count, order; }
|
||||
#define HASH_TYPE(v) typeof(** (v).data)
|
||||
@@ -178,3 +188,4 @@
|
||||
|
||||
#define HASH_WALK_FILTER_END } while (0)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user