88 *
99 *
1010 * IDENTIFICATION
11- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.207 2010/01/2114:58:53 rhaas Exp $
11+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.208 2010/01/2118:43:25 rhaas Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -3066,7 +3066,7 @@ PQescapeString(char *to, const char *from, size_t length)
30663066 * of memory condition, we return NULL, storing an error message into conn.
30673067 */
30683068static char *
3069- PQescapeInternal (PGconn * conn ,const char * str ,size_t len ,int as_ident )
3069+ PQescapeInternal (PGconn * conn ,const char * str ,size_t len ,bool as_ident )
30703070{
30713071const char * s ;
30723072char * result ;
@@ -3082,7 +3082,7 @@ PQescapeInternal(PGconn *conn, const char *str, size_t len, int as_ident)
30823082return NULL ;
30833083
30843084/* Scan the string for characters that must be escaped. */
3085- for (s = str ;* s != '\0' && (s - str )< len ;++ s )
3085+ for (s = str ; (s - str )< len && * s != '\0' ;++ s )
30863086{
30873087if (* s == quote_char )
30883088++ num_quotes ;
@@ -3188,13 +3188,13 @@ PQescapeInternal(PGconn *conn, const char *str, size_t len, int as_ident)
31883188char *
31893189PQescapeLiteral (PGconn * conn ,const char * str ,size_t len )
31903190{
3191- return PQescapeInternal (conn ,str ,len ,0 );
3191+ return PQescapeInternal (conn ,str ,len ,false );
31923192}
31933193
31943194char *
31953195PQescapeIdentifier (PGconn * conn ,const char * str ,size_t len )
31963196{
3197- return PQescapeInternal (conn ,str ,len ,1 );
3197+ return PQescapeInternal (conn ,str ,len ,true );
31983198}
31993199
32003200/* HEX encoding support for bytea */