T tracer tools: fix memory leaks, clang warnings

- Fix memory leaks detected by ASan
- Initialize variables that are flagged by compiler
- C struct initializer: x:y needs to be .x=y
This commit is contained in:
Cedric Roux
2023-07-13 10:29:33 +02:00
committed by Robert Schmidt
parent 5a98ead92b
commit 8a2a5015e6
6 changed files with 51 additions and 12 deletions
+2 -2
View File
@@ -55,8 +55,8 @@ int main(int n, char **v)
int found;
int count = 1;
int check_time = 0;
time_t sec;
long nsec;
time_t sec = 0; /* initialization not necessary but gcc is not happy */
long nsec = 0; /* initialization not necessary but gcc is not happy */
for (i = 1; i < n; i++) {
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();