> "ctx->state = OAUTH_STATE_FINISHED;" is duplicated in the “if” and after the “if”, so it can be pull up to before the
“if”.
It can't, because the if is based on ctx->state. If I move it to
before the if, I have to save the previous value, which just makes the
code longer.
I attached v4 with an edited commit message, nothing else changed.
Commitfest: https://commitfest.postgresql.org/patch/6529/