Clean up some needless malloc casts, convert some mallocs to callocs, and fix some style

This commit is contained in:
Michael McConville
2015-09-16 23:42:36 -04:00
parent 1d805b36b4
commit 445222e48c
8 changed files with 20 additions and 28 deletions

View File

@ -115,7 +115,7 @@ char* FreeBSDProcessList_readProcessName(kvm_t* kd, struct kinfo_proc* kproc, in
for (int i = 0; argv[i]; i++) {
len += strlen(argv[i]) + 1;
}
char* comm = malloc(len * sizeof(char));
char* comm = malloc(len);
char* at = comm;
*basenameEnd = 0;
for (int i = 0; argv[i]; i++) {