From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from integral2.. (unknown [180.246.147.8]) by gnuweeb.org (Postfix) with ESMTPSA id D0CBD7E39D; Wed, 27 Apr 2022 09:11:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1651050716; bh=s6TXsxAXZ1yOwFLgXSoTdAlAkX0OQvHuxv7hyY//CE4=; h=From:To:Cc:Subject:Date:From; b=aUJksRPY9G+7GFd7BdxnyaRftTUIwXm5hAXRgJ8DpddjnZ7sRfFBWE0szIfV2A/t9 zbfNXDn75xebeHB3aAv77DyDPl38+NM8QGv8EvrVLZ2sh08oiJz+yExnqonwbf3VM7 VieYof/ifc2nfjzHplvFbbEEgJPX8fh1d2e5cG95J+PQ6/MyoIosNEMwXf39fAxu43 DoenJCbkzMVCa2KJrC1KaocoXqXOMjEF+QaLX2sH8q5P4iyjpPtboaDtbqUDYxIuBP XRarklWm9YiMBS8NnhImxT+HFGEvNzoZRKTOvbG11QYBp76oytJKbporCoKUGbUDnl tEroLGXe4p0MQ== From: Ammar Faizi To: Jens Axboe Cc: fio Mailing List , GNU/Weeb Mailing List , Ammar Faizi Subject: [PATCH v2 0/6] Small fio cleanups and fixes Date: Wed, 27 Apr 2022 16:11:19 +0700 Message-Id: <20220427091125.114146-1-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: From: Ammar Faizi 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@gnuweeb.org/T/ Signed-off-by: Ammar Faizi --- 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