From d047c6cbc2ac7869bfd06941a328eaf34a561cd4 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 12 Mar 2016 14:38:41 +0100 Subject: [PATCH] ceph_test.c: constify --- src/ceph_test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ceph_test.c b/src/ceph_test.c index acab179e..11411406 100644 --- a/src/ceph_test.c +++ b/src/ceph_test.c @@ -24,8 +24,8 @@ struct case_s { - char *key; - char *value; + const char *key; + const char *value; }; typedef struct case_s case_t; @@ -136,11 +136,11 @@ DEF_TEST(traverse_json) yajl_handle hndl; #if HAVE_YAJL_V2 hndl = yajl_alloc (&callbacks, NULL, &ctx); - CHECK_ZERO (traverse_json ((unsigned char *) json, (uint32_t) strlen (json), hndl)); + CHECK_ZERO (traverse_json ((const unsigned char *) json, (uint32_t) strlen (json), hndl)); CHECK_ZERO (yajl_complete_parse (hndl)); #else hndl = yajl_alloc (&callbacks, NULL, NULL, &ctx); - CHECK_ZERO (traverse_json ((unsigned char *) json, (uint32_t) strlen (json), hndl)); + CHECK_ZERO (traverse_json ((const unsigned char *) json, (uint32_t) strlen (json), hndl)); CHECK_ZERO (yajl_parse_complete (hndl)); #endif @@ -150,8 +150,8 @@ DEF_TEST(traverse_json) DEF_TEST(parse_keys) { struct { - char *str; - char *want; + const char *str; + const char *want; } cases[] = { {"WBThrottle.bytes_dirtied.description.bytes_wb.description.ios_dirtied.description.ios_wb.type", "WBThrottle.bytesDirtied.description.bytesWb.description.iosDirt"}, {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}, -- 2.11.0