1) Pass the remaining bytes to read instead of total bytes to read_from_file. 2) Advance the read buffer pointer after a read.
3) To avoid saving and restoring these in/out arguments to the correct out values, observe that no callers are using their out values and convert them to in-only arguments.
…g completely broken)
1) Pass the remaining bytes to read instead of total bytes to read_from_file. 2) Advance the read buffer pointer after a read. 3) To avoid saving and restoring these in/out arguments to the correct out values, observe that no callers are using their out values and convert them to in-only arguments.