about summary refs log tree commit diff stats
path: root/src/xmpp/omemo.c
diff options
context:
space:
mode:
authorJohn Hernandez <129467592+H3rnand3zzz@users.noreply.github.com>2023-04-19 02:44:19 +0200
committerJohn Hernandez <129467592+H3rnand3zzz@users.noreply.github.com>2023-05-04 16:15:09 +0200
commit7f3fca2bd081a729d425184f7a0484025862257e (patch)
tree20f1cd78bf48f7d6ceb95bb0262faf691001bcf9 /src/xmpp/omemo.c
parentfaccf24c759d7bddb4d3062c7f044e0c7640ffe7 (diff)
downloadprofani-tty-7f3fca2bd081a729d425184f7a0484025862257e.tar.gz
Cleanup: gchar as gchar instead of char
Use gchar instead of char in most of the cases where gchar is intended.

Reason: improve compatibility and stability. Issue #1819

Minor refactoring.
Diffstat (limited to 'src/xmpp/omemo.c')
-rw-r--r--src/xmpp/omemo.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/xmpp/omemo.c b/src/xmpp/omemo.c
index e1bdbc3e..23c3d375 100644
--- a/src/xmpp/omemo.c
+++ b/src/xmpp/omemo.c
@@ -669,11 +669,10 @@ _omemo_bundle_publish_result(xmpp_stanza_t* const stanza, void* const userdata)
     xmpp_ctx_t* const ctx = connection_get_ctx();
     Jid* jid = jid_create(connection_get_fulljid());
     char* id = connection_create_stanza_id();
-    char* node = g_strdup_printf("%s:%d", STANZA_NS_OMEMO_BUNDLES, omemo_device_id());
+    auto_gchar gchar* node = g_strdup_printf("%s:%d", STANZA_NS_OMEMO_BUNDLES, omemo_device_id());
     log_debug("[OMEMO] node: %s", node);
 
     xmpp_stanza_t* iq = stanza_create_pubsub_configure_request(ctx, id, jid->barejid, node);
-    g_free(node);
 
     iq_id_handler_add(id, _omemo_bundle_publish_configure, NULL, userdata);
 
@@ -712,9 +711,8 @@ _omemo_bundle_publish_configure(xmpp_stanza_t* const stanza, void* const userdat
     xmpp_ctx_t* const ctx = connection_get_ctx();
     Jid* jid = jid_create(connection_get_fulljid());
     char* id = connection_create_stanza_id();
-    char* node = g_strdup_printf("%s:%d", STANZA_NS_OMEMO_BUNDLES, omemo_device_id());
+    auto_gchar gchar* node = g_strdup_printf("%s:%d", STANZA_NS_OMEMO_BUNDLES, omemo_device_id());
     xmpp_stanza_t* iq = stanza_create_pubsub_configure_submit(ctx, id, jid->barejid, node, form);
-    g_free(node);
 
     iq_id_handler_add(id, _omemo_bundle_publish_configure_result, NULL, userdata);