From: Ammar Faizi <ammarfaizi2@xxxxxxxxxxx> Hi Jens, This is patchset v2. There 6 patches in this series. It contains small cleanups and fixes: - Patch 1 is just a trivial indentation fix. - Patch 2, 3 are to add `ENOMEM` case error handling. - Patch 4 is to replace `malloc()` + `memset()` with `calloc()`. Also, add ENOMEM hanling. - Patch 5 is just a small optimization for json. - Patch 6 is to fix warning from clang-15 when compiling the autogenerated file lex.yy.c. ## Changelog v2: - Call `free()` properly when failure (use goto to do this) in patch #3. - Fix `calloc()` placement in patch #4. Link v1: https://lore.kernel.org/fio/20220426212044.78898-1-ammarfaizi2@xxxxxxxxxxx/T/ Signed-off-by: Ammar Faizi <ammarfaizi2@xxxxxxxxxxx> --- Ammar Faizi (6): backend: Fix indentation cgroup: Handle `ENOMEM` case on `malloc()` call stat: Handle `ENOMEM` case in `__show_run_stats()` engines/net: Replace `malloc()` + `memset()` with `calloc()` json: Change `if (!strlen(str))` to `if (!str[0])` Makefile: Suppress `-Wimplicit-fallthrough` when compiling `lex.yy` Makefile | 6 +++++- backend.c | 2 +- cgroup.c | 4 ++++ engines/net.c | 9 +++++---- json.c | 2 +- stat.c | 30 ++++++++++++++++++++++-------- 6 files changed, 38 insertions(+), 15 deletions(-) base-commit: 5f2d43188c2d65674aaba6280e2a87107e5d7099 -- Ammar Faizi