From dfd484f84b9d72a7bfbc842297c9afec60abf573 Mon Sep 17 00:00:00 2001 From: scottmk Date: Sat, 14 Aug 2010 21:55:50 +0000 Subject: [PATCH] Pedantic change for const-correctness: changed three calls to jsonObjectGetKey() to call jsonObjectGetKeyConst() instead. M Open-ILS/src/c-apps/oils_utils.c git-svn-id: svn://svn.open-ils.org/ILS/trunk@17220 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/c-apps/oils_utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/c-apps/oils_utils.c b/Open-ILS/src/c-apps/oils_utils.c index 07bf9f237..2be842060 100644 --- a/Open-ILS/src/c-apps/oils_utils.c +++ b/Open-ILS/src/c-apps/oils_utils.c @@ -305,7 +305,7 @@ char* oilsUtilsFetchOrgSetting( int orgid, const char* setting ) { "open-ils.actor", "open-ils.actor.ou_setting.ancestor_default", params); - char* value = jsonObjectToSimpleString(jsonObjectGetKey(set, "value")); + char* value = jsonObjectToSimpleString( jsonObjectGetKeyConst( set, "value" )); jsonObjectFree(params); jsonObjectFree(set); osrfLogDebug(OSRF_LOG_MARK, "Fetched org [%d] setting: %s => %s", orgid, setting, value); @@ -341,7 +341,7 @@ char* oilsUtilsLogin( const char* uname, const char* passwd, const char* type, i if(o) { const char* tok = jsonObjectGetString( - jsonObjectGetKey(jsonObjectGetKey(o,"payload"), "authtoken")); + jsonObjectGetKeyConst( jsonObjectGetKey( o,"payload" ), "authtoken" )); if( tok ) token = strdup( tok ); } @@ -439,7 +439,7 @@ long oilsUtilsIntervalToSeconds( const char* s ) { jsonObjectFree( query_obj ); // Get the results - jsonObject* seconds_obj = jsonObjectGetKey( result, "config.interval_to_seconds" ); + const jsonObject* seconds_obj = jsonObjectGetKeyConst( result, "config.interval_to_seconds" ); long seconds = -1; if( seconds_obj && JSON_NUMBER == seconds_obj->type ) seconds = (long) jsonObjectGetNumber( seconds_obj ); -- 2.11.0