Skip to content

Commit

Permalink
C89 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
weltling committed Oct 18, 2015
1 parent 2b5af60 commit 7f33ab8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ext/pdo_dblib/dblib_stmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7f33ab8

Please sign in to comment.