Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb8b37e4

Browse files
committed
Make libpqsrv_cancel's return const char *, not char *
Per headerscheck's C++ check.Discussion:https://postgr.es/m/372769.1712179784@sss.pgh.pa.us
1 parent8e39259 commitb8b37e4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

‎contrib/dblink/dblink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ Datum
13471347
dblink_cancel_query(PG_FUNCTION_ARGS)
13481348
{
13491349
PGconn*conn;
1350-
char*msg;
1350+
constchar*msg;
13511351
TimestampTzendtime;
13521352

13531353
dblink_init();

‎contrib/postgres_fdw/connection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1332,7 +1332,7 @@ pgfdw_cancel_query(PGconn *conn)
13321332
staticbool
13331333
pgfdw_cancel_query_begin(PGconn*conn,TimestampTzendtime)
13341334
{
1335-
char*errormsg=libpqsrv_cancel(conn,endtime);
1335+
constchar*errormsg=libpqsrv_cancel(conn,endtime);
13361336

13371337
if (errormsg!=NULL)
13381338
ereport(WARNING,

‎src/include/libpq/libpq-be-fe-helpers.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,11 +382,11 @@ libpqsrv_get_result(PGconn *conn, uint32 wait_event_info)
382382
* Note: this function leaks a string's worth of memory when reporting
383383
* libpq errors. Make sure to call it in a transient memory context.
384384
*/
385-
staticinlinechar*
385+
staticinlineconstchar*
386386
libpqsrv_cancel(PGconn*conn,TimestampTzendtime)
387387
{
388388
PGcancelConn*cancel_conn;
389-
char*error=NULL;
389+
constchar*error=NULL;
390390

391391
cancel_conn=PQcancelCreate(conn);
392392
if (cancel_conn==NULL)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp