about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMaxi Wuttke <mwuttke97@posteo.de>2022-09-28 21:02:20 +0000
committerMichael Vetter <jubalh@iodoru.org>2022-09-29 10:46:32 +0200
commit021927a549aecf0aaa8b1a54d692159ea9c897a6 (patch)
tree3afb7518f2c444ac1d256d8a0fc06d3dfcfacebe
parent7ffe55e980a7d33f1129331bb5dc34c6455b55a4 (diff)
downloadprofani-tty-021927a549aecf0aaa8b1a54d692159ea9c897a6.tar.gz
Use G_GSIZE_FORMAT instead of "%lu" for portability
In the function stanza_create_avatar_metadata_publish_iq, use the format
string `"%"G_GSIZE_FORMAT` instead of "%lu", for an argument of type
gsize.
-rw-r--r--src/xmpp/stanza.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xmpp/stanza.c b/src/xmpp/stanza.c
index c6bf19fb..afa51587 100644
--- a/src/xmpp/stanza.c
+++ b/src/xmpp/stanza.c
@@ -2661,7 +2661,7 @@ stanza_create_avatar_metadata_publish_iq(xmpp_ctx_t* ctx, const char* img_data,
     xmpp_stanza_set_name(info, STANZA_NAME_INFO);
     xmpp_stanza_set_attribute(info, "id", sha1);
     xmpp_free(ctx, sha1);
-    char* bytes = g_strdup_printf("%lu", len);
+    char* bytes = g_strdup_printf("%"G_GSIZE_FORMAT, len);
     char* h = g_strdup_printf("%d", height);
     char* w = g_strdup_printf("%d", width);
     xmpp_stanza_set_attribute(info, "bytes", bytes);