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

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Nov 9 09:46:22 EST 2009


Author: scottmk
Date: 2009-11-09 09:46:20 -0500 (Mon, 09 Nov 2009)
New Revision: 14841

Modified:
   trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
Minor tweak to avoid undefined behavior.

In SELECT() we issue a debug message to display the locale.  However
the locale can be NULL.  I added an explicit test to replace a NULL
with "(none)".

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


Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c	2009-11-09 02:28:23 UTC (rev 14840)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c	2009-11-09 14:46:20 UTC (rev 14841)
@@ -3121,7 +3121,7 @@
 	int gfirst = 1;
 	//int hfirst = 1;
 
-	osrfLogDebug(OSRF_LOG_MARK, "cstore SELECT locale: %s", locale);
+	osrfLogDebug(OSRF_LOG_MARK, "cstore SELECT locale: %s", locale ? locale : "(none)" );
 
 	// punt if there's no FROM clause
 	if (!join_hash || ( join_hash->type == JSON_HASH && !join_hash->size )) {



More information about the open-ils-commits mailing list