Add more uses of or_return

This commit is contained in:
gingerBill
2021-08-15 18:13:56 +01:00
parent b071a07c86
commit 4035fec784
6 changed files with 41 additions and 127 deletions
+1 -3
View File
@@ -183,9 +183,7 @@ writer_read_from :: proc(b: ^Writer, r: io.Reader) -> (n: i64, err: io.Error) {
for {
if writer_available(b) == 0 {
if ferr := writer_flush(b); ferr != nil {
return n, ferr;
}
writer_flush(b) or_return;
}
if b.max_consecutive_empty_writes <= 0 {
b.max_consecutive_empty_writes = DEFAULT_MAX_CONSECUTIVE_EMPTY_READS;