[frogr] Use Glib's G_*_FORMAT macros to specify format in printf-like strings



commit ea89f6d42f479443debb09ba740dd3857a41fa92
Author: Mario Sanchez Prada <msanchez gnome org>
Date:   Fri Jan 10 13:17:32 2020 +0100

    Use Glib's G_*_FORMAT macros to specify format in printf-like strings

 src/frogr-photoset.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/frogr-photoset.c b/src/frogr-photoset.c
index 2d737a7..c6c82e1 100644
--- a/src/frogr-photoset.c
+++ b/src/frogr-photoset.c
@@ -88,7 +88,13 @@ _create_temporary_id_for_photoset (void)
 
   /* The letters may increase uniqueness by preventing "melds"
      i.e. 01t01k01 and 0101t0k1 are not the same */
-  key = g_strdup_printf("%ut%liut%liu%up%ir%uk%u",
+  key = g_strdup_printf("%" G_GUINT32_FORMAT "t"
+                        "%" G_GINT64_FORMAT "ut"
+                        "%" G_GINT64_FORMAT "u"
+                        "%" G_GUINT32_FORMAT "p"
+                        "%" G_GINT32_FORMAT "r"
+                        "%" G_GUINT32_FORMAT "k"
+                        "%" G_GUINT32_FORMAT,
                         /* Duplicate keys must be generated
                            by two different program instances */
                         serial,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]