Browse Source

TT#14008 move g_string_free helper to auxlib

Change-Id: I34e0aa0be1df06346e86684c6488caf8e302df9f
pull/1194/head
Richard Fuchs 5 years ago
parent
commit
1dbfbe87d3
2 changed files with 6 additions and 6 deletions
  1. +0
    -6
      daemon/websocket.c
  2. +6
    -0
      lib/auxlib.h

+ 0
- 6
daemon/websocket.c View File

@ -314,12 +314,6 @@ static const char *websocket_http_ping(struct websocket_message *wm) {
}
static void __g_string_free(GString **s) {
g_string_free(*s, TRUE);
}
static void __g_hash_table_destroy(GHashTable **s) {
g_hash_table_destroy(*s);
}
static const char *websocket_http_metrics(struct websocket_message *wm) {
ilogs(http, LOG_DEBUG, "Respoding to GET /metrics");


+ 6
- 0
lib/auxlib.h View File

@ -291,6 +291,12 @@ INLINE void g_tree_clear(GTree *t) {
g_tree_remove(t, k);
}
}
INLINE void __g_string_free(GString **s) {
g_string_free(*s, TRUE);
}
INLINE void __g_hash_table_destroy(GHashTable **s) {
g_hash_table_destroy(*s);
}
#endif

Loading…
Cancel
Save