get rid of a small redundant code

This commit is contained in:
Yuichi Nishiwaki 2014-01-16 19:51:40 +09:00
parent f564626556
commit 9aef0cdac0
1 changed files with 2 additions and 2 deletions

View File

@ -191,7 +191,7 @@ pic_fread(void *ptr, size_t block, size_t nitems, pic_file *file)
} }
else { else {
memcpy(dst, file->s, avail); memcpy(dst, file->s, avail);
file->c -= avail; file->c = file->s;
size -= avail; size -= avail;
dst += avail; dst += avail;
pic_ffill(file); pic_ffill(file);
@ -212,7 +212,7 @@ pic_fwrite(const void *ptr, size_t block, size_t nitems, pic_file *file)
room = file->e - file->c; room = file->e - file->c;
if (room < size) { if (room < size) {
memcpy(file->c, dst, room); memcpy(file->c, dst, room);
file->c += room; file->c = file->e;
size -= room; size -= room;
dst += room; dst += room;
pic_fflush(file); pic_fflush(file);