21a6584e8ecdbba6d802ab30f3ec564c08b7dcc3 galt Sat Jun 29 02:11:16 2013 -0700 fixing callers of sqlGetField to use sqlSafeFrag diff --git src/hg/lib/spDb.c src/hg/lib/spDb.c index 5b68e17..f812a2b 100644 --- src/hg/lib/spDb.c +++ src/hg/lib/spDb.c @@ -592,50 +592,50 @@ } char *newSpDisplayId(char *oldSpDisplayId) /* Convert from old Swiss-Prot display ID to new display ID */ { static struct sqlConnection *conn=NULL; char condStr[255]; char *newSpDisplayId; if (conn==NULL) { conn = sqlConnect(PROTEOME_DB_NAME); if (conn == NULL) return NULL; } -safef(condStr, sizeof(condStr), "oldDisplayId='%s'", oldSpDisplayId); +sqlSafefFrag(condStr, sizeof(condStr), "oldDisplayId='%s'", oldSpDisplayId); newSpDisplayId = sqlGetField(PROTEOME_DB_NAME, "spOldNew", "newDisplayId", condStr); return(newSpDisplayId); } char *oldSpDisplayId(char *newSpDisplayId) /* Convert from new Swiss-Prot display ID to old display ID */ { static struct sqlConnection *conn=NULL; char condStr[255]; char *oldSpDisplayId; if (conn==NULL) { conn = sqlConnect(PROTEOME_DB_NAME); if (conn == NULL) return NULL; } -safef(condStr, sizeof(condStr), "newDisplayId='%s'", newSpDisplayId); +sqlSafefFrag(condStr, sizeof(condStr), "newDisplayId='%s'", newSpDisplayId); oldSpDisplayId = sqlGetField(PROTEOME_DB_NAME, "spOldNew", "oldDisplayId", condStr); return(oldSpDisplayId); } char *uniProtFindPrimAcc(char *id) /* Return primary accession given an alias. */ /* The alias could be an accession number, display ID, old display ID, etc. * NULL if not found. */ { static struct sqlConnection *conn=NULL; char *acc; char query[256]; if (conn==NULL)