Skip to content

Commit

Permalink
modules/kvs: Cleanup content_load_completion()
Browse files Browse the repository at this point in the history
Remove unnecessary cache_entry_create() call, as it is impossible
to reach.
  • Loading branch information
chu11 committed May 24, 2017
1 parent e6560ce commit e99fe4d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/modules/kvs/kvs.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,12 @@ static void content_load_completion (flux_rpc_t *rpc, void *arg)
json_tokener_reset (ctx->tok);
goto done;
}
if ((hp = cache_lookup (ctx->cache, blobref, ctx->epoch)))
cache_entry_set_json (hp, o);
else {
hp = cache_entry_create (o);
cache_insert (ctx->cache, blobref, hp);
}
/* cache entry must have be created earlier.
* cache_expire_entries() could not have removed it b/c it is not
* yet valid.
*/
assert ((hp = cache_lookup (ctx->cache, blobref, ctx->epoch)));
cache_entry_set_json (hp, o);
done:
flux_rpc_destroy (rpc);
}
Expand Down

0 comments on commit e99fe4d

Please sign in to comment.