View difference between Paste ID: 5M00nafC and eZCtE51x
SHOW: | | - or go back to the newest paste.
1-
int max=strlen(str)*2;
1+
int max=strlen(str)*5;
2
3
char * s=(char *)calloc(1,max);
4
5
if(max<(int)strlen(s)+20){
6-
	max+=max*5;
6+
	max+=max*3;
7
	s=(char *)realloc(s,max*sizeof(s));
8-
}
8+
}
9
10