Skip to content

Commit dfd5b4f

Browse files
committed
remove unnecessary memcpy, cast directly
1 parent a33d64e commit dfd5b4f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ext/mysqli/mysqli_api.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,8 +691,7 @@ PHP_FUNCTION(mysqli_stmt_fetch)
691691
};
692692
break;
693693
case IS_DOUBLE:
694-
memcpy(&dval, stmt->result.buf[i].val, sizeof(dval));
695-
ZVAL_DOUBLE(stmt->result.vars[i], dval);
694+
ZVAL_DOUBLE(stmt->result.vars[i], *(double *)stmt->result.buf[i].val);
696695
break;
697696
case IS_STRING:
698697
if (stmt->stmt->bind[i].buffer_type == MYSQL_TYPE_LONGLONG) {

0 commit comments

Comments
 (0)