Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 308dc9b

Browse files
knizhnikkelvich
authored andcommitted
Fix mistyping
1 parent 063909e commit 308dc9b

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

arbiter.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,8 +606,13 @@ static void MtmAppendBuffer(MtmBuffer* txBuffer, TransactionId xid, int node, Mt
606606
{
607607
MtmBuffer* buf = &txBuffer[node];
608608
if (buf->used == buf->size) {
609-
buf->size = buf->size ? buf->size*2 : INIT_BUFFER_SIZE;
610-
buf->data = repalloc(buf->data, buf->size * sizeof(MtmArbiterMessage));
609+
if (buf->size == 0) {
610+
buf->size = INIT_BUFFER_SIZE;
611+
buf->data = palloc(buf->size * sizeof(MtmArbiterMessage));
612+
} else {
613+
buf->size *= 2;
614+
buf->data = repalloc(buf->data, buf->size * sizeof(MtmArbiterMessage));
615+
}
611616
}
612617
buf->data[buf->used].dxid = xid;
613618

multimaster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ static TransactionManager MtmTM = {
177177

178178
char const* const MtmNodeStatusMnem[] =
179179
{
180-
"Intialization",
180+
"Initialization",
181181
"Offline",
182182
"Connected",
183183
"Online",

0 commit comments

Comments
 (0)