mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-31 18:56:20 +00:00
Moved FREE_SET_NULL to common.h
This commit is contained in:
@@ -36,6 +36,14 @@
|
|||||||
|
|
||||||
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
|
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
|
||||||
|
|
||||||
|
#define FREE_SET_NULL(resource) \
|
||||||
|
{ \
|
||||||
|
if (resource != NULL) { \
|
||||||
|
free(resource); \
|
||||||
|
resource = NULL; \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
void p_slist_free_full(GSList *items, GDestroyNotify free_func);
|
void p_slist_free_full(GSList *items, GDestroyNotify free_func);
|
||||||
void create_dir(char *name);
|
void create_dir(char *name);
|
||||||
char * str_replace(const char *string, const char *substr,
|
char * str_replace(const char *string, const char *substr,
|
||||||
|
|||||||
@@ -88,14 +88,6 @@ static int _presence_handler(xmpp_conn_t * const conn,
|
|||||||
xmpp_stanza_t * const stanza, void * const userdata);
|
xmpp_stanza_t * const stanza, void * const userdata);
|
||||||
static int _ping_timed_handler(xmpp_conn_t * const conn, void * const userdata);
|
static int _ping_timed_handler(xmpp_conn_t * const conn, void * const userdata);
|
||||||
|
|
||||||
#define FREE_SET_NULL(resource) \
|
|
||||||
{ \
|
|
||||||
if (resource != NULL) { \
|
|
||||||
free(resource); \
|
|
||||||
resource = NULL; \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
jabber_init(const int disable_tls)
|
jabber_init(const int disable_tls)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user