diff --git a/src/common.h b/src/common.h index d502dc4..0114888 100644 --- a/src/common.h +++ b/src/common.h @@ -1,3 +1,8 @@ +/** + * @file + * Common include headers + */ + #include #include #include @@ -14,18 +19,13 @@ #include #include +/** @defgroup MemoryMgmt Memory management macro + * @{*/ +/** frees memory and sets pointer to zero */ #define FREE(ptr) \ free((ptr)); (ptr) = NULL; +/** allocates memory, and checks is it really allocated */ #define CALLOC(ptr, nmemb, size) \ assert(((ptr) = calloc((nmemb), (size))) != NULL); - -#define STRNDUP(ptr, str, len) \ - assert(((ptr) = strndup((str), (len))) != NULL); - -/* -extern int image_add(uint64_t, char *path); -extern int image_del(uint64_t); -extern int image_exists(uint64_t); -extern int image_search(uint64_t, simdb_rec_t **data, size_t limit); -*/ +/** @} */