From: scottmk Date: Mon, 9 Nov 2009 14:46:20 +0000 (+0000) Subject: Minor tweak to avoid undefined behavior. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=cf7d90bf4c3486f0d3329b39dc646647200bb09d;p=evergreen%2Fpines.git 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 --- 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 )) {