`size_t' makes this safeguard unnecessary.
This commit is contained in:
		@@ -27,10 +27,6 @@ void deInitList(List *restrict l) {
 | 
			
		||||
void addToList(List *l, mpz_t n) {
 | 
			
		||||
	if(l->end == l->size) {
 | 
			
		||||
		l->size += BLOCK_SIZE;
 | 
			
		||||
		if(l->size == 0) {
 | 
			
		||||
			fprintf(stderr, "`l->size' has overflowed!\n");
 | 
			
		||||
			exit(1);
 | 
			
		||||
		}
 | 
			
		||||
		void *tmp = realloc(l->list, sizeof(mpz_t) * l->size);
 | 
			
		||||
		if(!tmp) {
 | 
			
		||||
			fprintf(stderr, "Failed to allocate more memory to list!\n");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user