u3: tweaks u3s_jam_fib() call sites, correcting byte-length calculation

This commit is contained in:
Joe Bryan 2020-09-29 12:24:00 -07:00
parent 5c8fac43d4
commit 5be91ad7b2
2 changed files with 5 additions and 8 deletions

View File

@ -122,15 +122,12 @@ _cj_bash(u3_noun bat)
}
else {
u3i_slab sab_u;
c3_w met_w;
c3_y* fat_y;
c3_y dig_y[32];
u3s_jam_fib(&sab_u, bat);
c3_w bit_w = u3s_jam_fib(&sab_u, bat);
c3_w met_w = (bit_w + 0x7) >> 3;
// XX assumes little-endian
//
fat_y = sab_u.buf_y;
met_w = sab_u.byt_d;
c3_y* fat_y = sab_u.buf_y;
c3_y dig_y[32];
#if defined(U3_OS_osx)
CC_SHA256_CTX ctx_h;

View File

@ -341,7 +341,7 @@ _test_jam_spec(const c3_c* cap_c,
u3i_slab sab_u;
c3_w bit_w = u3s_jam_fib(&sab_u, ref);
out_d = sab_u.byt_d;
out_d = ((c3_d)bit_w + 0x7) >> 3;
// XX assumes little-endian
//
out_y = sab_u.buf_y;