[glib] Avoid a portability problem in the checksum test



commit f802f467a5bc5454f7ca5c685fe6e1f3f05a2ae5
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Feb 3 09:50:48 2013 -0500

    Avoid a portability problem in the checksum test
    
    String literals are not guaranteed to work like this.
    https://bugzilla.gnome.org/show_bug.cgi?id=570572

 glib/tests/checksum.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib/tests/checksum.c b/glib/tests/checksum.c
index 900a538..4823c99 100644
--- a/glib/tests/checksum.c
+++ b/glib/tests/checksum.c
@@ -18,8 +18,8 @@
  * string is intentionally more than twice that length.
  */
 
-#define FIXED_STR               "The quick brown fox jumps over the lazy dog. Jackdaws love my big sphinx of quartz. Pack my box with five dozen liquor jugs. How razorback-jumping frogs can level six piqued gymnasts!"
-#define FIXED_LEN               (strlen (FIXED_STR))
+static const char FIXED_STR[] = "The quick brown fox jumps over the lazy dog. Jackdaws love my big sphinx of quartz. Pack my box with five dozen liquor jugs. How razorback-jumping frogs can level six piqued gymnasts!";
+#define FIXED_LEN (strlen (FIXED_STR))
 
 const char *MD5_sums[] = {
   "d41d8cd98f00b204e9800998ecf8427e",



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