From cf7d90bf4c3486f0d3329b39dc646647200bb09d Mon Sep 17 00:00:00 2001
From: scottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Mon, 9 Nov 2009 14:46:20 +0000
Subject: [PATCH] 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


git-svn-id: svn://svn.open-ils.org/ILS/trunk@14841 dcc99617-32d9-48b4-a31d-7c20da2025e4
---
 Open-ILS/src/c-apps/oils_cstore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Open-ILS/src/c-apps/oils_cstore.c b/Open-ILS/src/c-apps/oils_cstore.c
index 81ed19e9be..c3a93938a1 100644
--- a/Open-ILS/src/c-apps/oils_cstore.c
+++ b/Open-ILS/src/c-apps/oils_cstore.c
@@ -3121,7 +3121,7 @@ char* SELECT (
 	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 )) {
-- 
2.11.0