Browse Source

Use size_t instead of int, use more specific format string

pull/2878/head
Adam Baratz 9 years ago
parent
commit
2ecfcdaf1b
  1. 4
      ext/pdo_dblib/dblib_stmt.c

4
ext/pdo_dblib/dblib_stmt.c

@ -330,14 +330,14 @@ static int pdo_dblib_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr,
}
case SQLDATETIME:
case SQLDATETIM4: {
int dl;
size_t dl;
DBDATEREC di;
DBDATEREC dt;
dbconvert(H->link, coltype, data, -1, SQLDATETIME, (LPBYTE) &dt, -1);
dbdatecrack(H->link, &di, (DBDATETIME *) &dt);
dl = spprintf(&tmp_data, 20, "%d-%02d-%02d %02d:%02d:%02d",
dl = spprintf(&tmp_data, 20, "%04d-%02d-%02d %02d:%02d:%02d",
#if defined(PHP_DBLIB_IS_MSSQL) || defined(MSDBLIB)
di.year, di.month, di.day, di.hour, di.minute, di.second
#else

Loading…
Cancel
Save