working -u -l -c
This commit is contained in:
@ -838,9 +838,9 @@ int cmd_u(char *filelist, int print) {
|
||||
}
|
||||
|
||||
// we copy filelist because we are nice
|
||||
char *tofree = malloc(strnlen(filelist, MAXARGLENGTH)+1);
|
||||
char *tofree = calloc(strnlen(filelist, MAXARGLENGTH)+1, sizeof(char));
|
||||
if(!tofree) {
|
||||
perror("malloc");
|
||||
perror("calloc");
|
||||
return -1;
|
||||
}
|
||||
strncpy(tofree, filelist, strnlen(filelist, MAXARGLENGTH));
|
||||
@ -884,9 +884,9 @@ int cmd_c(char *filelist, int print) {
|
||||
}
|
||||
|
||||
// we copy filelist because we are nice
|
||||
char *tofree = malloc(strnlen(filelist, MAXARGLENGTH)+1);
|
||||
char *tofree = calloc(strnlen(filelist, MAXARGLENGTH)+1, sizeof(char));
|
||||
if(!tofree) {
|
||||
perror("malloc");
|
||||
perror("calloc");
|
||||
return -1;
|
||||
}
|
||||
strncpy(tofree, filelist, strnlen(filelist, MAXARGLENGTH));
|
||||
|
||||
Reference in New Issue
Block a user