aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-auth-oauth.c
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2025-03-19 16:58:48 +1300
committerThomas Munro <tmunro@postgresql.org>2025-03-19 16:59:25 +1300
commit1cf4c56480f883bec50753e092da51ceaf3cea67 (patch)
tree1bcffa01125902f58cedfff92b7d8b76c3b5fa5d /src/interfaces/libpq/fe-auth-oauth.c
parent873c0fd67872426e88ac07cbb7ae07457416aafa (diff)
downloadpostgresql-1cf4c56480f883bec50753e092da51ceaf3cea67.tar.gz
postgresql-1cf4c56480f883bec50753e092da51ceaf3cea67.zip
oauth: Simplify copy of PGoauthBearerRequest
Follow-up to 03366b61d. 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
Diffstat (limited to 'src/interfaces/libpq/fe-auth-oauth.c')
-rw-r--r--src/interfaces/libpq/fe-auth-oauth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-auth-oauth.c b/src/interfaces/libpq/fe-auth-oauth.c
index fb1e9a1a8aa..cf1a25e2ccc 100644
--- a/src/interfaces/libpq/fe-auth-oauth.c
+++ b/src/interfaces/libpq/fe-auth-oauth.c
@@ -781,7 +781,7 @@ setup_token_request(PGconn *conn, fe_oauth_state *state)
goto fail;
}
- memcpy(request_copy, &request, sizeof(request));
+ *request_copy = request;
conn->async_auth = run_user_oauth_flow;
conn->cleanup_async_auth = cleanup_user_oauth_flow;