Fix a bunch of trivial whitespace mistakes and update the miniobj.h

file before the real work starts.
This commit is contained in:
Poul-Henning Kamp 2011-02-25 09:40:17 +00:00
parent d25b0b98bc
commit fb4f617201
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=219027
9 changed files with 38 additions and 30 deletions

View File

@ -52,12 +52,12 @@
const char *fifolog_write_statnames[] = {
[FIFOLOG_PT_BYTES_PRE] = "Bytes before compression",
[FIFOLOG_PT_BYTES_POST] = "Bytes after compression",
[FIFOLOG_PT_WRITES] = "Writes",
[FIFOLOG_PT_FLUSH] = "Flushes",
[FIFOLOG_PT_SYNC] = "Syncs",
[FIFOLOG_PT_RUNTIME] = "Runtime"
[FIFOLOG_PT_BYTES_PRE] = "Bytes before compression",
[FIFOLOG_PT_BYTES_POST] = "Bytes after compression",
[FIFOLOG_PT_WRITES] = "Writes",
[FIFOLOG_PT_FLUSH] = "Flushes",
[FIFOLOG_PT_SYNC] = "Syncs",
[FIFOLOG_PT_RUNTIME] = "Runtime"
};
/*

View File

@ -29,7 +29,7 @@
#define ALLOC_OBJ(to, type_magic) \
do { \
(to) = calloc(sizeof *(to), 1); \
assert((to) != NULL); \
if ((to) != NULL) \
(to)->magic = (type_magic); \
} while (0)
@ -39,6 +39,9 @@
free(to); \
} while (0)
#define VALID_OBJ(ptr, type_magic) \
((ptr) != NULL && (ptr)->magic == (type_magic))
#define CHECK_OBJ(ptr, type_magic) \
do { \
assert((ptr)->magic == type_magic); \
@ -50,6 +53,12 @@
assert((ptr)->magic == type_magic); \
} while (0)
#define CHECK_OBJ_ORNULL(ptr, type_magic) \
do { \
if ((ptr) != NULL) \
assert((ptr)->magic == type_magic); \
} while (0)
#define CAST_OBJ(to, from, type_magic) \
do { \
(to) = (from); \
@ -63,4 +72,3 @@
assert((to) != NULL); \
CHECK_OBJ((to), (type_magic)); \
} while (0)