Skip to content

Commit

Permalink
Clean up latch sequence number checks
Browse files Browse the repository at this point in the history
We were checking multiple times whether it was 0.

Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
  • Loading branch information
kvanhees committed Aug 31, 2022
1 parent 9fec684 commit b2bad36
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions libdtrace/dt_aggregate.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,9 +421,6 @@ dt_agg_one_agg(dt_ident_t *aid, int64_t *dst, int64_t *src, uint_t datasz)
{
uint_t i, cnt;

if (*src == 0)
return;

switch (((dt_ident_t *)aid->di_iarg)->di_id) {
case DT_AGG_MAX:
*dst++ = *src++; /* copy latch sequence number */
Expand Down Expand Up @@ -489,10 +486,6 @@ dt_aggregate_snap_one(dt_idhash_t *dhp, dt_ident_t *aid, dt_snapstate_t *st)
return 0;
}

/* not found, so skip it if latch sequence number is 0 */
if (*src == 0)
return 0;

/* add it to the hash table */
h = dt_zalloc(st->dtp, sizeof(dt_ahashent_t));
if (h == NULL)
Expand Down

0 comments on commit b2bad36

Please sign in to comment.