mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Clean up some needless malloc casts, convert some mallocs to callocs, and fix some style
This commit is contained in:
@ -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++) {
|
||||
|
Reference in New Issue
Block a user