From 76fab7bd7e61e080ac8ae28450cae6f533159086 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 12 Mar 2025 13:56:54 -0400 Subject: generate_sbat_var_defs: run clang-format on readfile() Signed-off-by: Peter Jones --- generate_sbat_var_defs.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/generate_sbat_var_defs.c b/generate_sbat_var_defs.c index e29fcbd7..3ae62eba 100644 --- a/generate_sbat_var_defs.c +++ b/generate_sbat_var_defs.c @@ -41,8 +41,8 @@ readfile(char *SbatLevel_Variable) while (fgets(line, sizeof(line), varfilep) != NULL) { if (sscanf(line, "sbat,1,%d\n", &date) && strlen(line) == 18) { - revlistentry = - (sbat_revocation *)malloc(sizeof(sbat_revocation)); + revlistentry = (sbat_revocation *)malloc( + sizeof(sbat_revocation)); if (revlistentry == NULL) return -1; if (revlisthead == NULL) @@ -55,21 +55,21 @@ readfile(char *SbatLevel_Variable) revlistentry->date = date; while (line[0] != '\n' && fgets(line, sizeof(line), varfilep) != NULL) { - revlistentry->revocations = - (char *)realloc(revlistentry->revocations, - revocationsp + - strlen(line) + 1); - if (revlistentry->revocations == NULL) - return -1; - if (strlen(line) > 1) { - line[strlen(line) -1] = 0; - sprintf(revlistentry->revocations - + revocationsp, "%s\\n", line); - revocationsp = revocationsp + strlen(line) + 2; - } + revlistentry->revocations = (char *)realloc( + revlistentry->revocations, + revocationsp + strlen(line) + 1); + if (revlistentry->revocations == NULL) + return -1; + if (strlen(line) > 1) { + line[strlen(line) - 1] = 0; + sprintf(revlistentry->revocations + + revocationsp, + "%s\\n", line); + revocationsp = + revocationsp + strlen(line) + 2; + } } revocationsp = 0; - } } -- cgit v1.2.3