Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
basic/copy: Avoid pointless zero-sized sendfile/copy
A while ago I copied a version of this code into libglnx, and was recently doing some work on it: GNOME/libglnx#44 While there I noticed that if a maximum size was provided, we could end up doing a zero-sized `sendfile()` call which is obviously pointless. If we have nothing to do at the of the loop, just break out.
- Loading branch information