return no_error;
}
-void parse_log_opt(int argc, char **argv, const char *deft);
-
int main(int argc,char **argv) {
gras_error_t errcode;
gras_dict_t *head=NULL;
char *key;
void *data;
- parse_log_opt(argc,argv,"dict.thresh=verbose");
+ gras_init_defaultlog(argc,argv,"dict.thresh=verbose");
srand((unsigned int)time(NULL));
printf("Dictionnary: CRASH test:\n");
}
}
}
+ free(key);
printf("\n Remove my 200 000 elements. (a point is 10 000 elements)\n");
if (!(key=malloc(10))) {
fprintf(stderr,"Out of memory\n");
- return 3;
+ abort();
}
for (j=0;j<NB_ELM;j++) {
if (!(j%10000)) printf("."); fflush(stdout);
TRYFAIL(gras_dict_remove(head,key));
}
printf("\n");
+ free(key);
printf("\n Free the structure (twice)\n");