Itagaki Takahiro, with slight modifications.
snprintf(old_clog_path, sizeof(old_clog_path), "%s/pg_clog", old_cluster.pgdata);
snprintf(new_clog_path, sizeof(new_clog_path), "%s/pg_clog", new_cluster.pgdata);
- if (rmtree(new_clog_path, true) != true)
+ if (!rmtree(new_clog_path, true))
pg_log(PG_FATAL, "Unable to delete directory %s\n", new_clog_path);
check_ok();
}
#define GinIsNewKey(s) ( ((GinScanOpaque) scan->opaque)->keys == NULL )
-#define GinIsVoidRes(s) ( ((GinScanOpaque) scan->opaque)->isVoidRes == true )
+#define GinIsVoidRes(s) ( ((GinScanOpaque) scan->opaque)->isVoidRes )
Datum
gingetbitmap(PG_FUNCTION_ARGS)
for (i = OffsetNumberNext(FirstOffsetNumber); i <= maxoff; i = OffsetNumberNext(i))
{
cur = DatumGetBoxP(entryvec->vector[i].key);
- if (allisequal == true && (
- pageunion.high.x != cur->high.x ||
- pageunion.high.y != cur->high.y ||
- pageunion.low.x != cur->low.x ||
- pageunion.low.y != cur->low.y
- ))
+ if (allisequal && (
+ pageunion.high.x != cur->high.x ||
+ pageunion.high.y != cur->high.y ||
+ pageunion.low.x != cur->low.x ||
+ pageunion.low.y != cur->low.y
+ ))
allisequal = false;
adjustBox(&pageunion, cur);
if (is_cycled != NULL)
{
new->is_cycled = intVal(is_cycled->arg);
- Assert(new->is_cycled == false || new->is_cycled == true);
+ Assert(BoolIsValid(new->is_cycled));
}
else if (isInit)
new->is_cycled = false;
switch (ptr->type)
{
case RSF_ONEOF:
- if (mb_strchr((char *) ptr->data, c) != true)
+ if (!mb_strchr((char *) ptr->data, c))
return false;
break;
case RSF_NONEOF:
- if (mb_strchr((char *) ptr->data, c) == true)
+ if (mb_strchr((char *) ptr->data, c))
return false;
break;
default:
t.p[1] = *b;
s.p[0] = poly->p[(start == 0) ? (poly->npts - 1) : (start - 1)];
- for (i = start; i < poly->npts && res == true; i++)
+ for (i = start; i < poly->npts && res; i++)
{
Point *interpt;
s.p[0] = polyb->p[polyb->npts - 1];
result = true;
- for (i = 0; i < polyb->npts && result == true; i++)
+ for (i = 0; i < polyb->npts && result; i++)
{
s.p[1] = polyb->p[i];
result = lseg_inside_poly(s.p, s.p + 1, polya, 0);
StopHigh = StopMiddle;
}
- if (item->prefix == true)
+ if (item->prefix)
{
if (StopLow >= StopHigh)
StopMiddle = StopHigh;
StopHigh = StopMiddle;
}
- if (res == false && val->prefix == true)
+ if (!res && val->prefix)
{
/*
* there was a failed exact search, so we should scan further to find
unsigned int nbspace;
if (opt_border != 0 ||
- (format->wrap_right_border == false && i > 0))
+ (!format->wrap_right_border && i > 0))
fputs(curr_nl_line ? format->header_nl_left : " ",
fout);
else
fprintf(fout, "%*s", width_wrap[i], "");
- if (opt_border != 0 || format->wrap_right_border == true)
+ if (opt_border != 0 || format->wrap_right_border)
fputs(!header_done[i] ? format->header_nl_right : " ",
fout);
ecpg_log("ECPGsetcommit on line %d: action \"%s\"; connection \"%s\"\n", lineno, mode, con->name);
- if (con->autocommit == true && strncmp(mode, "off", strlen("off")) == 0)
+ if (con->autocommit && strncmp(mode, "off", strlen("off")) == 0)
{
if (PQtransactionStatus(con->connection) == PQTRANS_IDLE)
{
}
con->autocommit = false;
}
- else if (con->autocommit == false && strncmp(mode, "on", strlen("on")) == 0)
+ else if (!con->autocommit && strncmp(mode, "on", strlen("on")) == 0)
{
if (PQtransactionStatus(con->connection) != PQTRANS_IDLE)
{
}
ECPG: opt_hold block
{
- if (compat == ECPG_COMPAT_INFORMIX_SE && autocommit == true)
+ if (compat == ECPG_COMPAT_INFORMIX_SE && autocommit)
$$ = make_str("with hold");
else
$$ = EMPTY;