From 1dbfbe87d3bc42dafbf82953377dd8e738a4e727 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 2 Feb 2021 11:53:10 -0500 Subject: [PATCH] TT#14008 move g_string_free helper to auxlib Change-Id: I34e0aa0be1df06346e86684c6488caf8e302df9f --- daemon/websocket.c | 6 ------ lib/auxlib.h | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/daemon/websocket.c b/daemon/websocket.c index 81f359c91..1844f56c7 100644 --- a/daemon/websocket.c +++ b/daemon/websocket.c @@ -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"); diff --git a/lib/auxlib.h b/lib/auxlib.h index a4141cb05..bac6e33f5 100644 --- a/lib/auxlib.h +++ b/lib/auxlib.h @@ -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