Cleanup: avoid redundant read(..) call in read_file_as_buffer

This commit is contained in:
Campbell Barton
2023-12-10 15:20:49 +11:00
parent 5d5fd5d676
commit af4160de3a

View File

@@ -2338,6 +2338,10 @@ static char *read_file_as_buffer(const int fd, const bool nil_terminate, size_t
*chunk_link_p = chunk;
chunk_link_p = &chunk->next;
len += len_chunk;
if (len_chunk != sizeof(chunk->data)) {
break;
}
}
char *buf = nullptr;