Skip to content

Commit

Permalink
ames: fix _ames_lane_from_cache logic to return the head always
Browse files Browse the repository at this point in the history
  • Loading branch information
pkova committed Nov 6, 2023
1 parent c6dbc60 commit d1a4e34
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions pkg/vere/io/ames.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,10 +924,19 @@ _ames_lane_into_cache(u3p(u3h_root) lax_p, u3_noun who, u3_noun las) {
/* _ames_lane_from_cache(): retrieve lane for who from cache, if any
*/
static u3_weak
_ames_lane_from_cache(u3p(u3h_root) lax_p, u3_noun who, c3_o nal) {
_ames_lane_from_cache(u3p(u3h_root) lax_p, u3_noun who, c3_o nal_o) {
u3_weak lac = u3h_git(lax_p, who);

if (nal == c3n && u3_none != lac ) {
if ( u3_none == lac ) {
u3z(who);
return lac;
}

if ( nal_o == c3y ) {
lac = u3k(u3h(lac));
}

else {
struct timeval tim_tv;
gettimeofday(&tim_tv, 0);
u3_noun now = u3_time_in_tv(&tim_tv);
Expand Down

0 comments on commit d1a4e34

Please sign in to comment.