Skip to content

Commit

Permalink
RESPONDER: remove unreachable code
Browse files Browse the repository at this point in the history
At 'immediately:' when condition (ret == EOK) is met,
'refresh_timeout' can't be 'true', so code can't be reached.

It was different before 827a9bf

Reviewed-by: Pavel Březina <[email protected]>
Reviewed-by: Tomáš Halman <[email protected]>
  • Loading branch information
alexey-tikhonov committed Feb 10, 2025
1 parent fdf0b50 commit 2a40db3
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/responder/common/responder_get_domains.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ struct tevent_req *sss_dp_get_domains_send(TALLOC_CTX *mem_ctx,
struct tevent_req *req;
struct tevent_req *subreq;
struct sss_dp_get_domains_state *state;
bool refresh_timeout = false;

req = tevent_req_create(mem_ctx, &state, struct sss_dp_get_domains_state);
if (req == NULL) {
Expand All @@ -169,7 +168,6 @@ struct tevent_req *sss_dp_get_domains_send(TALLOC_CTX *mem_ctx,
goto immediately;
}
}
refresh_timeout = true;

state->rctx = rctx;
if (hint != NULL) {
Expand All @@ -195,9 +193,6 @@ struct tevent_req *sss_dp_get_domains_send(TALLOC_CTX *mem_ctx,

immediately:
if (ret == EOK) {
if (refresh_timeout) {
set_time_of_last_request(rctx);
}
tevent_req_done(req);
} else {
tevent_req_error(req, ret);
Expand Down

0 comments on commit 2a40db3

Please sign in to comment.