Skip to content

Commit d401df6

Browse files
committed
Rename loop to cycle
1 parent d63b397 commit d401df6

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

contrib/pg_dtm/dtmd/include/ddd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ typedef struct Graph
3434

3535
extern void initGraph(Graph* graph);
3636
extern void addSubgraph(Instance* instance, Graph* graph, xid_t* xids, int n_xids);
37-
extern bool findLoop(Graph* graph, xid_t root);
37+
extern bool findCycle(Graph* graph, xid_t root);
3838

3939
#endif

contrib/pg_dtm/dtmd/src/ddd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static bool recursiveTraverseGraph(Vertex* root, Vertex* v, int marker)
119119
return false;
120120
}
121121

122-
bool findLoop(Graph* graph, xid_t root)
122+
bool findCycle(Graph* graph, xid_t root)
123123
{
124124
Vertex* v;
125125
for (v = graph->hashtable[root % MAX_TRANSACTIONS]; v != NULL; v = v->next) {

contrib/pg_dtm/dtmd/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ static void ondeadlock(client_t client, int argc, xid_t *argv) {
547547
xid_t root = argv[1];
548548
Instance* instance = &CLIENT_USERDATA(client)->instance;
549549
addSubgraph(instance, &graph, argv+2, argc-2);
550-
bool hasDeadLock = findLoop(&graph, root);
550+
bool hasDeadLock = findCycle(&graph, root);
551551
client_message_shortcut(client, hasDeadLock ? RES_DEADLOCK : RES_OK);
552552
}
553553

contrib/pg_dtm/pg_dtm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ DtmGetNewTransactionId(bool isSubXact)
445445

446446
if (IsUnderPostmaster && TransactionIdFollowsOrEquals(xid, xidStopLimit))
447447
{
448-
char oldest_datname = get_database_name(oldest_datoid);
448+
char *oldest_datname = get_database_name(oldest_datoid);
449449

450450
/* complain even if that DB has disappeared */
451451
if (oldest_datname)
@@ -466,7 +466,7 @@ DtmGetNewTransactionId(bool isSubXact)
466466
else
467467
if (TransactionIdFollowsOrEquals(xid, xidWarnLimit))
468468
{
469-
char oldest_datname = get_database_name(oldest_datoid);
469+
char *oldest_datname = get_database_name(oldest_datoid);
470470

471471
/* complain even if that DB has disappeared */
472472
if (oldest_datname)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy