Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/noun/jets/c/bex.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ u3qc_bex(u3_atom a)
u3i_slab sab_u;

if ( a < 31 ) {
return 1 << a;
return 1U << a;
}

if ( c3y == u3a_is_cat(a) ) {
Expand All @@ -34,7 +34,7 @@ u3qc_bex(u3_atom a)

u3i_slab_init(&sab_u, 0, a_d + 1);

sab_u.buf_w[a_d >> 5] = (c3_d)1 << (a_d & 31);
sab_u.buf_w[a_d >> 5] = 1U << (a_d & 31);

return u3i_slab_moot(&sab_u);
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/ur/bitstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ _bsw_bytes_unsafe(ur_bsw_t *bsw, const uint64_t len, const uint8_t* src)

{
uint8_t tal = (src[len_byt] >> rest)
^ (( off > len_bit ) ? 0 : (src[len_byt + 1] << off));
^ (( off >= len_bit ) ? 0 : (src[len_byt + 1] << off));
dst[len_byt] = tal & ((1 << len_bit) - 1);
}

Expand Down
8 changes: 4 additions & 4 deletions pkg/vere/db/lmdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,15 @@ u3_lmdb_gulf(MDB_env* env_u, c3_d* low_d, c3_d* hig_d)
return c3n;
}
else {
memcpy(&fir_d, key_u.mv_data, sizeof(c3_d));
fir_d = c3_sift_chub(key_u.mv_data);
}

// read with the cursor from the end of the database
//
ret_w = mdb_cursor_get(cur_u, &key_u, &val_u, MDB_LAST);

if ( !ret_w ) {
memcpy(&las_d, key_u.mv_data, sizeof(c3_d));
las_d = c3_sift_chub(key_u.mv_data);
}

// clean up unconditionally, we're done
Expand Down Expand Up @@ -588,11 +588,11 @@ u3_lmdb_walk_next(u3_lmdb_walk* itr_u, size_t* len_i, void** buf_v)

// sanity check: ensure contiguous event numbers
//
if ( *(c3_d*)key_u.mv_data != itr_u->nex_d ) {
if ( c3_sift_chub(key_u.mv_data) != itr_u->nex_d ) {
fprintf(stderr, "lmdb: read gap: expected %" PRIu64
", received %" PRIu64 "\r\n",
itr_u->nex_d,
*(c3_d*)key_u.mv_data);
c3_sift_chub(key_u.mv_data));
return c3n;
}

Expand Down