]> granicus.if.org Git - php/commitdiff
remove unnecessary memcpy, cast directly
authorAndrey Hristov <andrey@php.net>
Sun, 26 Mar 2006 21:08:41 +0000 (21:08 +0000)
committerAndrey Hristov <andrey@php.net>
Sun, 26 Mar 2006 21:08:41 +0000 (21:08 +0000)
ext/mysqli/mysqli_api.c

index 6ab053ef8b5160c248fb4bc3d282e33e21974f1b..8d53ac6070ac8e2db2000dbe412b5060c685657d 100644 (file)
@@ -691,8 +691,7 @@ PHP_FUNCTION(mysqli_stmt_fetch)
                                                };
                                                break;
                                        case IS_DOUBLE:
-                                               memcpy(&dval, stmt->result.buf[i].val, sizeof(dval));
-                                               ZVAL_DOUBLE(stmt->result.vars[i], dval);
+                                               ZVAL_DOUBLE(stmt->result.vars[i], *(double *)stmt->result.buf[i].val);
                                                break;
                                        case IS_STRING:
                                                if (stmt->stmt->bind[i].buffer_type == MYSQL_TYPE_LONGLONG) {