]> granicus.if.org Git - php/commitdiff
Simplify code
authorIlia Alshanetsky <iliaa@php.net>
Tue, 29 Jan 2008 01:17:30 +0000 (01:17 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 29 Jan 2008 01:17:30 +0000 (01:17 +0000)
ext/pdo_pgsql/pgsql_statement.c

index 197c3f5290ade4f7c07857cf1e64aac76900ca74..84af470f3c093d1828d5022fe516de082bad0648 100644 (file)
@@ -631,18 +631,16 @@ static int pgsql_stmt_get_column_meta(pdo_stmt_t *stmt, long colno, zval *return
                /* Failed to get system catalogue, but return success
                 * with the data we have collected so far
                 */
-               PQclear(res);
-               return 1;
+               goto done;
        }
 
        /* We want exactly one row returned */
        if (1 != PQntuples(res)) {
-               PQclear(res);
-               return 1;
+               goto done;
        }
 
        add_assoc_string(return_value, "native_type", PQgetvalue(res, 0, 0), 1);
-
+done:
        PQclear(res);           
        return 1;
 }