diff options
Diffstat (limited to 'ext/bcmath/libbcmath/src')
-rw-r--r-- | ext/bcmath/libbcmath/src/div.c | 3 | ||||
-rw-r--r-- | ext/bcmath/libbcmath/src/init.c | 2 | ||||
-rw-r--r-- | ext/bcmath/libbcmath/src/output.c | 1 |
3 files changed, 0 insertions, 6 deletions
diff --git a/ext/bcmath/libbcmath/src/div.c b/ext/bcmath/libbcmath/src/div.c index 3da8874431..df5de29919 100644 --- a/ext/bcmath/libbcmath/src/div.c +++ b/ext/bcmath/libbcmath/src/div.c @@ -128,13 +128,11 @@ bc_divide (bc_num n1, bc_num n2, bc_num *quot, int scale) else extra = 0; num1 = (unsigned char *) safe_emalloc (1, n1->n_len+n1->n_scale, extra+2); - if (num1 == NULL) bc_out_of_memory(); memset (num1, 0, n1->n_len+n1->n_scale+extra+2); memcpy (num1+1, n1->n_value, n1->n_len+n1->n_scale); len2 = n2->n_len + scale2; num2 = (unsigned char *) safe_emalloc (1, len2, 1); - if (num2 == NULL) bc_out_of_memory(); memcpy (num2, n2->n_value, len2); *(num2+len2) = 0; n2ptr = num2; @@ -165,7 +163,6 @@ bc_divide (bc_num n1, bc_num n2, bc_num *quot, int scale) /* Allocate storage for the temporary storage mval. */ mval = (unsigned char *) safe_emalloc (1, len2, 1); - if (mval == NULL) bc_out_of_memory (); /* Now for the full divide algorithm. */ if (!zero) diff --git a/ext/bcmath/libbcmath/src/init.c b/ext/bcmath/libbcmath/src/init.c index d3a2e580e5..fe4ad25688 100644 --- a/ext/bcmath/libbcmath/src/init.c +++ b/ext/bcmath/libbcmath/src/init.c @@ -61,7 +61,6 @@ _bc_new_num_ex (length, scale, persistent) _bc_Free_list = temp->n_next; } else { temp = (bc_num) pemalloc (sizeof(bc_struct), persistent); - if (temp == NULL) bc_out_of_memory (); } #endif temp->n_sign = PLUS; @@ -70,7 +69,6 @@ _bc_new_num_ex (length, scale, persistent) temp->n_refs = 1; /* PHP Change: malloc() -> pemalloc() */ temp->n_ptr = (char *) safe_pemalloc (1, length, scale, persistent); - if (temp->n_ptr == NULL) bc_out_of_memory(); temp->n_value = temp->n_ptr; memset (temp->n_ptr, 0, length+scale); return temp; diff --git a/ext/bcmath/libbcmath/src/output.c b/ext/bcmath/libbcmath/src/output.c index 1759dc68f2..9fbca0f4c4 100644 --- a/ext/bcmath/libbcmath/src/output.c +++ b/ext/bcmath/libbcmath/src/output.c @@ -153,7 +153,6 @@ bc_out_num (bc_num num, int o_base, void (*out_char)(), int leading_zero) bc_modulo (int_part, base, &cur_dig, 0); /* PHP Change: malloc() -> emalloc() */ temp = (stk_rec *) emalloc (sizeof(stk_rec)); - if (temp == NULL) bc_out_of_memory(); temp->digit = bc_num2long (cur_dig); temp->next = digits; digits = temp; |