Attention is currently required from: Aarya, Anastasia Klimchuk, Nikolai Artemiev.
View Change
1 comment:
File cli_output.c:
Patch Set #9, Line 164: progress_separator = (fmt[strlen(fmt) - 1] == '\n' ? NEWLINE : MIDLINE);
Oh yes, I haven't thought about it! There are probably many ways to fix that, I picked one way, let […]
I don't think it's worth calling `strlen()` twice like that in case of lots of logging lines. Also if the format is empty, the state shouldn't change at all. Maybe make a function like this to also reduce duplication:
```c
static void update_line_state(const char *fmt)
{
size_t len = strlen(fmt);
if (len != 0)
line_state = (fmt[len - 1] == '\n' ? NEWLINE : MIDLINE);
}
```
To view, visit change 84102. To unsubscribe, or for help writing mail filters, visit settings.
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: If1e40fc97f443c4f0c0501cef11cff1f3f84c051
Gerrit-Change-Number: 84102
Gerrit-PatchSet: 11
Gerrit-Owner: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Gerrit-Reviewer: Aarya <aarya.chaumal@gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev@google.com>
Gerrit-Reviewer: Peter Marheine <pmarheine@chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Attention: Aarya <aarya.chaumal@gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev@google.com>
Gerrit-Comment-Date: Sat, 19 Oct 2024 16:03:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Anastasia Klimchuk <aklm@chromium.org>
Comment-In-Reply-To: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>