Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons, Nikolai Artemiev, Sergii Dmytruk.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58481 )
Change subject: libflashrom,writeprotect: add flashrom_wp_get_available_ranges()
......................................................................
Patch Set 10:
(1 comment)
File writeprotect.c:
https://review.coreboot.org/c/flashrom/+/58481/comment/fb352f65_1ab37f18
PS10, Line 271: ranges[++last] = ranges[i];
In the first iteration (last == 0, i == 0), it would compare the same […]
Thank you!
I took a paper and a pen and now I understand :) The code transforms AAABCD into ABCDCD and then cuts the array. This is why I got confused - the dupes are still there, I missed that array length is cut.
Agree with empty array situation, maybe return early if count == 0 ?
--
To view, visit
https://review.coreboot.org/c/flashrom/+/58481
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id51f038f03305c8536d80313e52f77d27835f34d
Gerrit-Change-Number: 58481
Gerrit-PatchSet: 10
Gerrit-Owner: Nikolai Artemiev
nartemiev@google.com
Gerrit-Reviewer: Anastasia Klimchuk
aklm@chromium.org
Gerrit-Reviewer: Angel Pons
th3fanbus@gmail.com
Gerrit-Reviewer: Edward O'Callaghan
quasisec@chromium.org
Gerrit-Reviewer: Nico Huber
nico.h@gmx.de
Gerrit-Reviewer: Sergii Dmytruk
sergii.dmytruk@3mdeb.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Paul Menzel
paulepanter@mailbox.org
Gerrit-Attention: Nico Huber
nico.h@gmx.de
Gerrit-Attention: Edward O'Callaghan
quasisec@chromium.org
Gerrit-Attention: Angel Pons
th3fanbus@gmail.com
Gerrit-Attention: Nikolai Artemiev
nartemiev@google.com
Gerrit-Attention: Sergii Dmytruk
sergii.dmytruk@3mdeb.com
Gerrit-Comment-Date: Tue, 16 Nov 2021 22:52:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber
nico.h@gmx.de
Comment-In-Reply-To: Anastasia Klimchuk
aklm@chromium.org
Gerrit-MessageType: comment