]> granicus.if.org Git - php/commitdiff
remove dead code
authorAndrey Hristov <andrey@php.net>
Mon, 17 Feb 2014 17:04:01 +0000 (19:04 +0200)
committerAndrey Hristov <andrey@php.net>
Mon, 17 Feb 2014 17:04:01 +0000 (19:04 +0200)
ext/mysqlnd/mysqlnd_result.c

index 944999b79caaa76aa236017687335ad7ca663b6b..a4fb9f6cf440b9abd91ab5ec7116c5e23a5b8d14 100644 (file)
@@ -1155,24 +1155,6 @@ MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const c
                */
        }
        /* Overflow ? */
-#if 0
-       if (set->row_count) {
-               /* don't try to allocate more than possible - mnd_XXalloc expects size_t, and it can have narrower range than uint64_t */
-               if (set->row_count * meta->field_count * sizeof(zval *) > SIZE_MAX) {
-                       SET_OOM_ERROR(*conn->error_info);
-                       ret = FAIL;
-                       goto end;
-               }
-               /* if pecalloc is used valgrind barks gcc version 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036] (SUSE Linux) */
-               set->data = mnd_emalloc((size_t)(set->row_count * meta->field_count * sizeof(zval *)));
-               if (!set->data) {
-                       SET_OOM_ERROR(*conn->error_info);
-                       ret = FAIL;
-                       goto end;
-               }
-               memset(set->data, 0, (size_t)(set->row_count * meta->field_count * sizeof(zval *)));
-       }
-#endif
        MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn->stats,
                                                                           binary_protocol? STAT_ROWS_BUFFERED_FROM_CLIENT_PS:
                                                                                                                STAT_ROWS_BUFFERED_FROM_CLIENT_NORMAL,