Changeset 454 for trunk/src/bignum.c
- Timestamp:
- Jun 29, 2014, 7:30:04 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bignum.c
r435 r454 64 64 #define ulong unsigned long 65 65 66 /*67 extern void *malloc(size_t size);68 extern void free();69 */70 71 66 char *last_string = NULL; 72 67 char *big_end_string = NULL; … … 232 227 dgs_alloc += alloclen; 233 228 #endif 234 digit_ptr = (DIGIT *) malloc(alloclen *sizeof(DIGIT));229 digit_ptr = calloc(alloclen, sizeof(DIGIT)); 235 230 if (digit_ptr == NULL) 236 231 { … … 625 620 big_set_long((long)1, &big_one); 626 621 length_last_string = 10; 627 if ((last_string = malloc(length_last_string)) == NULL)622 if ((last_string = calloc(1,length_last_string)) == NULL) 628 623 { 629 624 big_errno = BIG_MEMERR; … … 955 950 if (last_string != NULL) 956 951 free(last_string); 957 if ((last_string = malloc(str_length)) == NULL)952 if ((last_string = calloc(1,str_length)) == NULL) 958 953 { 959 954 big_errno = BIG_MEMERR;
Note:
See TracChangeset
for help on using the changeset viewer.