5b8c4168d4807c729fc8b1f199d9eb03c9411069
galt
  Thu Mar 3 18:40:54 2016 -0800
Replacing simple literal NOSQLINJ in string with the #define NOSQLINJ. This is slightly better because the compiler can catch a mis-spelling of the NOSQLINJ keyword. This was suggested by Angie.

diff --git src/hg/hgTracks/cgapSageTrack.c src/hg/hgTracks/cgapSageTrack.c
index e0e9107..6b6e5a3 100644
--- src/hg/hgTracks/cgapSageTrack.c
+++ src/hg/hgTracks/cgapSageTrack.c
@@ -13,31 +13,31 @@
 #include "cgapSage/cgapSage.h"
 #include "cgapSage/cgapSageLib.h"
 
 static int grayIxForCgap(double tpm)
 /* Return a grayIx based on the score. */
 {
 int val = (int)ceil(tpm);
 return grayInRange(val, 0, 150);
 }
 
 static struct hash *libTissueHash(struct sqlConnection *conn)
 /* Read two columns of a table and hash em up. */
 {
 struct hash *ret = newHash(9);
 struct sqlResult *sr = NULL;
-char query[49] = "NOSQLINJ select libId,tissue from cgapSageLib";
+char query[49] = NOSQLINJ "select libId,tissue from cgapSageLib";
 char **row;
 sr = sqlGetResult(conn, query);
 while ((row = sqlNextRow(sr)) != NULL)
     hashAdd(ret, row[0], cloneString(row[1]));
 sqlFreeResult(&sr);
 return ret;
 }
 
 struct cgapSageTpmHashEl 
 /* A convenience struct for computing means. */
     {
     double total;
     long freqTotal;
     long libTotals;
     int count;
@@ -230,31 +230,31 @@
 	    lf->grayIx = grayIxForCgap(tag->tagTpms[i]);
 	    lf->extra = cloneString(link);
 	    addSimpleFeature(lf);	
 	    slAddHead(&libList, lf);
 	    }
 	}
     }
 slSort(&libList, cgapLinkedFeaturesCmp);
 slReverse(&libList);
 return libList;
 }
 
 struct hash *getTotTagsHashFromTable(struct sqlConnection *conn)
 /* Load the cgapSageLib table for the db then call getTotTagsHash. */
 {
-struct cgapSageLib *libs = cgapSageLibLoadByQuery(conn, "NOSQLINJ select * from cgapSageLib");
+struct cgapSageLib *libs = cgapSageLibLoadByQuery(conn, NOSQLINJ "select * from cgapSageLib");
 struct hash *libTotHash = getTotTagsHash(libs);
 cgapSageLibFreeList(&libs);
 return libTotHash;
 }
 
 void cgapSageLoadItems(struct track *tg)
 /* This function loads the beds in the current window into a linkedFeatures list. */
 /* Each bed entry may turn into multiple linkedFeatures because one is made for */
 /* each library at a given tag (bed). */
 {
 struct linkedFeatures *itemList = NULL;
 struct sqlConnection *conn = hAllocConn(database);
 struct hash *libHash = libTissueHash(conn);
 struct hash *libTotHash = getTotTagsHashFromTable(conn);
 struct sqlResult *sr = NULL;