source: libabac/abac_util.h @ 7764378

abac0-leak
Last change on this file since 7764378 was 7764378, checked in by Mei <mei@…>, 6 years ago

1) tweak according valgrind's leak report

  • Property mode set to 100644
File size: 593 bytes
Line 
1#ifndef __UTIL_H__
2#define __UTIL_H__
3
4#include <sys/types.h>
5#include <stdlib.h>
6
7#ifndef __ABAC_CHUNK_T__
8#define __ABAC_CHUNK_T__
9typedef struct _abac_chunk_t {
10    unsigned char *ptr;
11    int len;
12} abac_chunk_t;
13#endif /* __ABAC_CHUNK_T__ */
14
15void abac_chunk_free(abac_chunk_t);
16void *abac_xmalloc(size_t);
17char *abac_xstrdup(char *);
18void *abac_xrealloc(void *, size_t);
19void abac_split(char *string, char *delim, char **ret, int *num);
20
21#ifdef DEBUG
22#define debug_printf(...) fprintf(stderr, __VA_ARGS__)
23#else
24#define debug_printf(...) do { } while (0)
25#endif
26
27#endif /* __UTIL_H__ */
Note: See TracBrowser for help on using the repository browser.