Skip to content

Commit 1cf4c56

Browse files
committed
oauth: Simplify copy of PGoauthBearerRequest
Follow-up to 03366b6. Since there are no more const members in the PGoauthBearerRequest struct, the previous memcpy() can be replaced with simple assignment. Author: Jacob Champion <jacob.champion@enterprisedb.com> Discussion: https://postgr.es/m/p4bd7mn6dxr2zdak74abocyltpfdxif4pxqzixqpxpetjwt34h%40qc6jgfmoddvq
1 parent 873c0fd commit 1cf4c56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/interfaces/libpq/fe-auth-oauth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ setup_token_request(PGconn *conn, fe_oauth_state *state)
781781
goto fail;
782782
}
783783

784-
memcpy(request_copy, &request, sizeof(request));
784+
*request_copy = request;
785785

786786
conn->async_auth = run_user_oauth_flow;
787787
conn->cleanup_async_auth = cleanup_user_oauth_flow;

0 commit comments

Comments
 (0)