]> granicus.if.org Git - php/commitdiff
Simplify code and fix compiler warning.
authorIlia Alshanetsky <iliaa@php.net>
Sat, 12 Feb 2005 20:55:28 +0000 (20:55 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sat, 12 Feb 2005 20:55:28 +0000 (20:55 +0000)
ext/pdo_pgsql/pgsql_driver.c

index ca14b2c1b543bdcc21ba1a8b14ad4c19a9e132de..dc7da53afdf09a8ef32bd7d8bf9742aa7f0f1f71 100644 (file)
@@ -124,7 +124,6 @@ static int pgsql_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len,
 {
        pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh->driver_data;
        pdo_pgsql_stmt *S = ecalloc(1, sizeof(pdo_pgsql_stmt));
-       int ret = 1;
        int scrollable;
 
        S->H = H;
@@ -136,12 +135,10 @@ static int pgsql_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len,
                PDO_CURSOR_FWDONLY TSRMLS_CC) == PDO_CURSOR_SCROLL;
 
        if (scrollable) {
-               int ret = 1;
-
-               spprintf(&S->cursor_name, 0, "pdo_pgsql_cursor_%08x", stmt);
+               spprintf(&S->cursor_name, 0, "pdo_pgsql_cursor_%08x", (unsigned int) stmt);
        }
 
-       return ret;
+       return 1;
 }
 
 static long pgsql_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len TSRMLS_DC)