mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-01 19:46:36 +03:00
u3: refactors _ce_loom_blit_north(), replacing loop with a single read
This commit is contained in:
parent
0959bb60f3
commit
0682cc2864
@ -754,16 +754,11 @@ _ce_patch_apply(u3_ce_patch* pat_u)
|
||||
static void
|
||||
_ce_loom_blit_north(c3_i fid_i, c3_w pgs_w)
|
||||
{
|
||||
c3_w i_w;
|
||||
c3_w* ptr_w;
|
||||
size_t off_i;
|
||||
size_t len_i = (size_t)pgs_w << (u3a_page + 2);
|
||||
ssize_t ret_i;
|
||||
|
||||
for ( i_w = 0; i_w < pgs_w; i_w++ ) {
|
||||
off_i = (size_t)i_w << (u3a_page + 2);
|
||||
ptr_w = u3_Loom + (i_w << u3a_page);
|
||||
|
||||
if ( pag_siz_i != (ret_i = c3_pread(fid_i, ptr_w, pag_siz_i, off_i)) ) {
|
||||
if ( pgs_w ) {
|
||||
if ( len_i != (ret_i = c3_pread(fid_i, u3_Loom, len_i, 0)) ) {
|
||||
if ( 0 < ret_i ) {
|
||||
fprintf(stderr, "loom: blit north partial read: %zu\r\n",
|
||||
(size_t)ret_i);
|
||||
|
Loading…
Reference in New Issue
Block a user