[open-ils-commits] r17220 - trunk/Open-ILS/src/c-apps (scottmk)

svn at svn.open-ils.org svn at svn.open-ils.org
Sat Aug 14 17:55:56 EDT 2010


Author: scottmk
Date: 2010-08-14 17:55:50 -0400 (Sat, 14 Aug 2010)
New Revision: 17220

Modified:
   trunk/Open-ILS/src/c-apps/oils_utils.c
Log:
Pedantic change for const-correctness: changed three calls to
jsonObjectGetKey() to call jsonObjectGetKeyConst() instead.

M    Open-ILS/src/c-apps/oils_utils.c


Modified: trunk/Open-ILS/src/c-apps/oils_utils.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_utils.c	2010-08-13 19:11:38 UTC (rev 17219)
+++ trunk/Open-ILS/src/c-apps/oils_utils.c	2010-08-14 21:55:50 UTC (rev 17220)
@@ -305,7 +305,7 @@
 		"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 @@
 
 	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 @@
 	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 );



More information about the open-ils-commits mailing list