]> granicus.if.org Git - php/commitdiff
C89 compat
authorAnatol Belski <ab@php.net>
Sun, 18 Oct 2015 09:14:30 +0000 (11:14 +0200)
committerAnatol Belski <ab@php.net>
Sun, 18 Oct 2015 09:14:30 +0000 (11:14 +0200)
ext/pdo_dblib/dblib_stmt.c

index 0b519995ca000ad6d70b02731fbc5fca9e5f1592..d6c2c703d520aa7de7a02878eb9eb03e2e9ef111 100644 (file)
@@ -197,14 +197,15 @@ static int pdo_dblib_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC)
 {
        pdo_dblib_stmt *S = (pdo_dblib_stmt*)stmt->driver_data;
        pdo_dblib_db_handle *H = S->H;
+       struct pdo_column_data *col;
+       char *fname;
        
        if(colno >= stmt->column_count || colno < 0)  {
                return FAILURE;
        }
        
-       struct pdo_column_data *col = &stmt->columns[colno];
-
-       char *fname = (char*)dbcolname(H->link, colno+1);
+       col = &stmt->columns[colno];
+       fname = (char*)dbcolname(H->link, colno+1);
 
        if (fname && *fname) {
                col->name = estrdup(fname);