Skip to content

Commit 585a0bb

Browse files
authored
Merge pull request #44 from flatcar/fix-unsigned-difference
Potential fix for code scanning alert no. 3: Unsigned difference expression compared to zero
2 parents 0c023bc + 8f2d776 commit 585a0bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/update_engine/extent_writer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ bool DirectExtentWriter::Write(const void* bytes, size_t count) {
1818
return true;
1919
const char* c_bytes = reinterpret_cast<const char*>(bytes);
2020
size_t bytes_written = 0;
21-
while (count - bytes_written > 0) {
21+
while (bytes_written < count) {
2222
TEST_AND_RETURN_FALSE(next_extent_index_ < extents_.size());
2323
uint64_t bytes_remaining_next_extent =
2424
extents_[next_extent_index_].num_blocks() * block_size_ -

0 commit comments

Comments
 (0)