mirror of
https://github.com/urbit/shrub.git
synced 2024-12-30 07:35:19 +03:00
u3: use u3s_cue_sill_with() in u3u_uncram()
This commit is contained in:
parent
bf117f63a8
commit
fe01695594
@ -860,23 +860,20 @@ u3u_uncram(c3_c* dir_c, c3_d eve_d)
|
||||
// XX errors are fatal, barring a full "u3m_reboot"-type operation.
|
||||
//
|
||||
{
|
||||
ur_dict32_t dic_u = {0};
|
||||
u3_noun roc, cod, ref;
|
||||
|
||||
// XX tune the initial dictionary size for less reallocation
|
||||
//
|
||||
ur_dict32_grow((ur_root_t*)0, &dic_u, ur_fib33, ur_fib34);
|
||||
u3_cue_sill* sil_u = u3s_cue_sill_init_with(ur_fib33, ur_fib34);
|
||||
u3_weak ref = u3s_cue_sill_with(sil_u, len_d, byt_y);
|
||||
u3_noun roc, cod;
|
||||
|
||||
if ( c3n == u3s_cue_xeno_unsafe(&dic_u, len_d, byt_y, &ref) ) {
|
||||
u3s_cue_sill_done(sil_u);
|
||||
|
||||
if ( u3_none == ref ) {
|
||||
fprintf(stderr, "uncram: failed to cue rock\r\n");
|
||||
ur_dict_free((ur_dict_t*)&dic_u);
|
||||
c3_free(nam_c);
|
||||
return c3n;
|
||||
}
|
||||
|
||||
ur_dict_free((ur_dict_t*)&dic_u);
|
||||
|
||||
if ( c3n == u3r_pq(ref, c3__fast, &roc, &cod) ) {
|
||||
else if ( c3n == u3r_pq(ref, c3__fast, &roc, &cod) ) {
|
||||
fprintf(stderr, "uncram: failed: invalid rock format\r\n");
|
||||
u3z(ref);
|
||||
c3_free(nam_c);
|
||||
|
Loading…
Reference in New Issue
Block a user