chg: use calloc
This commit is contained in:
@@ -377,7 +377,9 @@ ipqx:
|
||||
|
||||
/* allocate argument array */
|
||||
args = argc - optind;
|
||||
if(!(apolys = malloc(args * sizeof(poly_t)))){
|
||||
|
||||
apolys = calloc(args * sizeof(poly_t), sizeof(char));
|
||||
if ( !apolys ){
|
||||
uerror("cannot allocate memory for argument list");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user