]> granicus.if.org Git - php/commitdiff
fix C89 compat
authorAnatol Belski <ab@php.net>
Mon, 29 Feb 2016 14:24:31 +0000 (15:24 +0100)
committerAnatol Belski <ab@php.net>
Mon, 29 Feb 2016 14:24:31 +0000 (15:24 +0100)
ext/pdo_dblib/dblib_driver.c

index 26ee139d2d08d2ea16ec2ad8831e0ebd38d5c1f8..70b440298213260348b12d21f09cf99838f7a916 100644 (file)
@@ -286,8 +286,6 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
                
        };
        
-       nvers = sizeof(tdsver)/sizeof(tdsver[0]);
-       
        struct pdo_data_src_parser vars[] = {
                { "charset",    NULL,   0 }
                ,{ "appname",   "PHP " PDO_DBLIB_FLAVOUR,       0 }
@@ -298,6 +296,7 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
        };
        
        nvars = sizeof(vars)/sizeof(vars[0]);
+       nvers = sizeof(tdsver)/sizeof(tdsver[0]);
        
        php_pdo_parse_data_source(dbh->data_source, dbh->data_source_len, vars, nvars);