Run pgindent with new pg_bsd_indent version 2.1.1.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 16 May 2020 15:54:51 +0000 (11:54 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 16 May 2020 15:54:51 +0000 (11:54 -0400)
Thomas Munro fixed a longstanding annoyance in pg_bsd_indent, that
it would misformat lines containing IsA() macros on the assumption
that the IsA() call should be treated like a cast.  This improves
some other cases involving field/variable names that match typedefs,
too.  The only places that get worse are a couple of uses of the
OpenSSL macro STACK_OF(); we'll gladly take that trade-off.

Discussion: https://postgr.es/m/20200114221814.GA19630@alvherre.pgsql

33 files changed:
src/backend/commands/explain.c
src/backend/commands/tablecmds.c
src/backend/commands/typecmds.c
src/backend/executor/nodeAgg.c
src/backend/executor/nodeProjectSet.c
src/backend/libpq/be-secure-openssl.c
src/backend/nodes/outfuncs.c
src/backend/optimizer/path/costsize.c
src/backend/optimizer/plan/setrefs.c
src/backend/optimizer/util/pathnode.c
src/backend/parser/analyze.c
src/backend/parser/parse_agg.c
src/backend/parser/parse_clause.c
src/backend/parser/parse_expr.c
src/backend/statistics/extended_stats.c
src/backend/utils/adt/datetime.c
src/backend/utils/adt/formatting.c
src/backend/utils/adt/numeric.c
src/backend/utils/adt/ruleutils.c
src/backend/utils/adt/timestamp.c
src/backend/utils/adt/varbit.c
src/backend/utils/adt/varchar.c
src/bin/pg_dump/pg_backup_directory.c
src/bin/psql/tab-complete.c
src/common/jsonapi.c
src/interfaces/ecpg/ecpglib/execute.c
src/interfaces/ecpg/ecpglib/prepare.c
src/interfaces/libpq/fe-secure-openssl.c
src/pl/plpgsql/src/pl_exec.c
src/timezone/localtime.c
src/timezone/strftime.c
src/timezone/zic.c
src/tools/pgindent/pgindent

index 058610af9b0dc596b09488beac0519236af9d9a5..efd7201d611769e627f63d0d0cacd0210becc0a8 100644 (file)
@@ -753,7 +753,7 @@ ExplainPrintPlan(ExplainState *es, QueryDesc *queryDesc)
         * further down in the plan tree.
         */
        ps = queryDesc->planstate;
-       if (IsA(ps, GatherState) &&((Gather *) ps->plan)->invisible)
+       if (IsA(ps, GatherState) && ((Gather *) ps->plan)->invisible)
        {
                ps = outerPlanState(ps);
                es->hide_workers = true;
@@ -2256,7 +2256,7 @@ show_scan_qual(List *qual, const char *qlabel,
 {
        bool            useprefix;
 
-       useprefix = (IsA(planstate->plan, SubqueryScan) ||es->verbose);
+       useprefix = (IsA(planstate->plan, SubqueryScan) || es->verbose);
        show_qual(qual, qlabel, planstate, ancestors, useprefix, es);
 }
 
index 8d2ed986d183a3629f8cffd0c55e5d2124ba2179..8801af589cf351326ce7d2607524ddb3f385f171 100644 (file)
@@ -11136,7 +11136,7 @@ ATColumnChangeRequiresRewrite(Node *expr, AttrNumber varattno)
        for (;;)
        {
                /* only one varno, so no need to check that */
-               if (IsA(expr, Var) &&((Var *) expr)->varattno == varattno)
+               if (IsA(expr, Var) && ((Var *) expr)->varattno == varattno)
                        return false;
                else if (IsA(expr, RelabelType))
                        expr = (Node *) ((RelabelType *) expr)->arg;
index 8891b1d56458ff2173c2abebb236de9e4a0547b4..9e5938b10eb1d268fa52f75e2f78db93fe3f2de3 100644 (file)
@@ -2176,7 +2176,7 @@ AlterDomainDefault(List *names, Node *defaultRaw)
                 * DefineDomain.)
                 */
                if (defaultExpr == NULL ||
-                       (IsA(defaultExpr, Const) &&((Const *) defaultExpr)->constisnull))
+                       (IsA(defaultExpr, Const) && ((Const *) defaultExpr)->constisnull))
                {
                        /* Default is NULL, drop it */
                        defaultExpr = NULL;
index 8553db0dd07b79fa2e76ef4f61fb7360631a8809..26111327ca157b3debaa5c34336ee92ae90424e2 100644 (file)
@@ -1410,7 +1410,7 @@ find_unaggregated_cols_walker(Node *node, Bitmapset **colnos)
                *colnos = bms_add_member(*colnos, var->varattno);
                return false;
        }
-       if (IsA(node, Aggref) ||IsA(node, GroupingFunc))
+       if (IsA(node, Aggref) || IsA(node, GroupingFunc))
        {
                /* do not descend into aggregate exprs */
                return false;
index 4a1b060fde60115789d17efe30d9f02dce02066e..e8da6eaec9148c7c0e938e69b18bfba876198b39 100644 (file)
@@ -277,8 +277,8 @@ ExecInitProjectSet(ProjectSet *node, EState *estate, int eflags)
                TargetEntry *te = (TargetEntry *) lfirst(lc);
                Expr       *expr = te->expr;
 
-               if ((IsA(expr, FuncExpr) &&((FuncExpr *) expr)->funcretset) ||
-                       (IsA(expr, OpExpr) &&((OpExpr *) expr)->opretset))
+               if ((IsA(expr, FuncExpr) && ((FuncExpr *) expr)->funcretset) ||
+                       (IsA(expr, OpExpr) && ((OpExpr *) expr)->opretset))
                {
                        state->elems[off] = (Node *)
                                ExecInitFunctionResultSet(expr, state->ps.ps_ExprContext,
index 7e15778da52e9739e3865a752d7d436f93f66f61..78a865d23b6617b98500a2028ba9d0ea771816ce 100644 (file)
@@ -80,7 +80,7 @@ static int    ssl_protocol_version_to_openssl(int v);
 int
 be_tls_init(bool isServerStart)
 {
-       STACK_OF(X509_NAME) *root_cert_list = NULL;
+       STACK_OF(X509_NAME) * root_cert_list = NULL;
        SSL_CTX    *context;
        int                     ssl_ver_min = -1;
        int                     ssl_ver_max = -1;
index bb1565467d43486f3453fbc0d1fa2e977440c4c1..ebf3ce37aaa8df9084b858219395d2458858d51b 100644 (file)
@@ -3682,7 +3682,7 @@ outNode(StringInfo str, const void *obj)
 
        if (obj == NULL)
                appendStringInfoString(str, "<>");
-       else if (IsA(obj, List) ||IsA(obj, IntList) || IsA(obj, OidList))
+       else if (IsA(obj, List) || IsA(obj, IntList) || IsA(obj, OidList))
                _outList(str, obj);
        else if (IsA(obj, Integer) ||
                         IsA(obj, Float) ||
index f4d4a4df66ce9106a67738ec23eea92eb7fd371f..b976afb69df67dd02dbf93690f97fbf78c3f2675 100644 (file)
@@ -3257,7 +3257,7 @@ final_cost_mergejoin(PlannerInfo *root, MergePath *path,
         * The whole issue is moot if we are working from a unique-ified outer
         * input, or if we know we don't need to mark/restore at all.
         */
-       if (IsA(outer_path, UniquePath) ||path->skip_mark_restore)
+       if (IsA(outer_path, UniquePath) || path->skip_mark_restore)
                rescannedtuples = 0;
        else
        {
index 2b676bf406166ce7a96152e6329167873fd5cb0a..baefe0e946173a5c57b0db932ab7add3c7cbd4da 100644 (file)
@@ -1960,7 +1960,7 @@ set_upper_references(PlannerInfo *root, Plan *plan, int rtoffset)
 static void
 set_param_references(PlannerInfo *root, Plan *plan)
 {
-       Assert(IsA(plan, Gather) ||IsA(plan, GatherMerge));
+       Assert(IsA(plan, Gather) || IsA(plan, GatherMerge));
 
        if (plan->lefttree->extParam)
        {
index d09bc6d291a148b7683f6533ecefc4812fa666f2..e845a4b1ae1312a106e424dd57474d99d0b40279 100644 (file)
@@ -2639,7 +2639,7 @@ apply_projection_to_path(PlannerInfo *root,
         * workers can help project.  But if there is something that is not
         * parallel-safe in the target expressions, then we can't.
         */
-       if ((IsA(path, GatherPath) ||IsA(path, GatherMergePath)) &&
+       if ((IsA(path, GatherPath) || IsA(path, GatherMergePath)) &&
                is_parallel_safe(root, (Node *) target->exprs))
        {
                /*
index eee9c33637b66af176489715dc3a4df6c413598c..401da5dedf73b5c0076dd0144e1530819e2da9df 100644 (file)
@@ -221,7 +221,7 @@ transformOptionalSelectInto(ParseState *pstate, Node *parseTree)
                /* If it's a set-operation tree, drill down to leftmost SelectStmt */
                while (stmt && stmt->op != SETOP_NONE)
                        stmt = stmt->larg;
-               Assert(stmt && IsA(stmt, SelectStmt) &&stmt->larg == NULL);
+               Assert(stmt && IsA(stmt, SelectStmt) && stmt->larg == NULL);
 
                if (stmt->intoClause)
                {
@@ -641,7 +641,7 @@ transformInsertStmt(ParseState *pstate, InsertStmt *stmt)
                        if (tle->resjunk)
                                continue;
                        if (tle->expr &&
-                               (IsA(tle->expr, Const) ||IsA(tle->expr, Param)) &&
+                               (IsA(tle->expr, Const) || IsA(tle->expr, Param)) &&
                                exprType((Node *) tle->expr) == UNKNOWNOID)
                                expr = tle->expr;
                        else
index f1cc5479e43ba86ddf4d5d4011d4989283261c84..f813b587f186aae8b77d83efcb0233123b216f42 100644 (file)
@@ -750,8 +750,8 @@ check_agg_arguments_walker(Node *node,
         */
        if (context->sublevels_up == 0)
        {
-               if ((IsA(node, FuncExpr) &&((FuncExpr *) node)->funcretset) ||
-                       (IsA(node, OpExpr) &&((OpExpr *) node)->opretset))
+               if ((IsA(node, FuncExpr) && ((FuncExpr *) node)->funcretset) ||
+                       (IsA(node, OpExpr) && ((OpExpr *) node)->opretset))
                        ereport(ERROR,
                                        (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                                         errmsg("aggregate function calls cannot contain set-returning function calls"),
index 96ae3a7e64d3a7c0dbd2985d62d0de68ad7dd2a6..6fff13479e47f6f19d830ce61a231a6fd6694bfb 100644 (file)
@@ -1767,7 +1767,7 @@ transformLimitClause(ParseState *pstate, Node *clause,
         * unadorned NULL that's not accepted back by the grammar.
         */
        if (exprKind == EXPR_KIND_LIMIT && limitOption == LIMIT_OPTION_WITH_TIES &&
-               IsA(clause, A_Const) &&((A_Const *) clause)->val.type == T_Null)
+               IsA(clause, A_Const) && ((A_Const *) clause)->val.type == T_Null)
                ereport(ERROR,
                                (errcode(ERRCODE_INVALID_ROW_COUNT_IN_LIMIT_CLAUSE),
                                 errmsg("row count cannot be NULL in FETCH FIRST ... WITH TIES clause")));
index 831db4af9559c18589ef81211cee09fe495b1dc0..f69976cc8c989b0021dd677e0051e87de172322e 100644 (file)
@@ -961,7 +961,7 @@ transformAExprOp(ParseState *pstate, A_Expr *a)
                list_length(a->name) == 1 &&
                strcmp(strVal(linitial(a->name)), "=") == 0 &&
                (exprIsNullConstant(lexpr) || exprIsNullConstant(rexpr)) &&
-               (!IsA(lexpr, CaseTestExpr) &&!IsA(rexpr, CaseTestExpr)))
+               (!IsA(lexpr, CaseTestExpr) && !IsA(rexpr, CaseTestExpr)))
        {
                NullTest   *n = makeNode(NullTest);
 
index c7e16f2f212682576f7f3c37a142c28d16a52261..ab6f1e1c9dc985754563e173bba6272a8fc7c246 100644 (file)
@@ -1479,13 +1479,13 @@ examine_clause_args(List *args, Var **varp, Const **cstp, bool *varonleftp)
        if (IsA(rightop, RelabelType))
                rightop = (Node *) ((RelabelType *) rightop)->arg;
 
-       if (IsA(leftop, Var) &&IsA(rightop, Const))
+       if (IsA(leftop, Var) && IsA(rightop, Const))
        {
                var = (Var *) leftop;
                cst = (Const *) rightop;
                varonleft = true;
        }
-       else if (IsA(leftop, Const) &&IsA(rightop, Var))
+       else if (IsA(leftop, Const) && IsA(rightop, Var))
        {
                var = (Var *) rightop;
                cst = (Const *) leftop;
index 7a965973cd25583d09a880d52431e98306cb8c14..1914138a24a595be282195b6e9319a2654baf518 100644 (file)
@@ -4471,7 +4471,7 @@ TemporalSimplify(int32 max_precis, Node *node)
 
        typmod = (Node *) lsecond(expr->args);
 
-       if (IsA(typmod, Const) &&!((Const *) typmod)->constisnull)
+       if (IsA(typmod, Const) && !((Const *) typmod)->constisnull)
        {
                Node       *source = (Node *) linitial(expr->args);
                int32           old_precis = exprTypmod(source);
index aab5802edb4674391155f9e8912f738ec698991c..16768b28c30e922df27a897fe7d102dad4f63d86 100644 (file)
@@ -5025,7 +5025,7 @@ NUM_prepare_locale(NUMProc *Np)
                if (lconv->thousands_sep && *lconv->thousands_sep)
                        Np->L_thousands_sep = lconv->thousands_sep;
                /* Make sure thousands separator doesn't match decimal point symbol. */
-               else if (strcmp(Np->decimal, ",") !=0)
+               else if (strcmp(Np->decimal, ",") != 0)
                        Np->L_thousands_sep = ",";
                else
                        Np->L_thousands_sep = ".";
index 9986132b45e286bdf246741d39db3e6c992da09f..f3a725271e6cfcbe537a2ceab761c3718792eab2 100644 (file)
@@ -911,7 +911,7 @@ numeric_support(PG_FUNCTION_ARGS)
 
                typmod = (Node *) lsecond(expr->args);
 
-               if (IsA(typmod, Const) &&!((Const *) typmod)->constisnull)
+               if (IsA(typmod, Const) && !((Const *) typmod)->constisnull)
                {
                        Node       *source = (Node *) linitial(expr->args);
                        int32           old_typmod = exprTypmod(source);
index 723a8fa48cff8aeb7ebc6f142e3cc14ede0227e4..076c3c019ff425852dfdcb9ce19cf8f0602ddf87 100644 (file)
@@ -5829,8 +5829,8 @@ get_rule_sortgroupclause(Index ref, List *tlist, bool force_colno,
                 */
                bool            need_paren = (PRETTY_PAREN(context)
                                                                  || IsA(expr, FuncExpr)
-                                                                 ||IsA(expr, Aggref)
-                                                                 ||IsA(expr, WindowFunc));
+                                                                 || IsA(expr, Aggref)
+                                                                 || IsA(expr, WindowFunc));
 
                if (need_paren)
                        appendStringInfoChar(context->buf, '(');
@@ -10317,7 +10317,7 @@ get_from_clause_item(Node *jtnode, Query *query, deparse_context *context)
 
                need_paren_on_right = PRETTY_PAREN(context) &&
                        !IsA(j->rarg, RangeTblRef) &&
-                       !(IsA(j->rarg, JoinExpr) &&((JoinExpr *) j->rarg)->alias != NULL);
+                       !(IsA(j->rarg, JoinExpr) && ((JoinExpr *) j->rarg)->alias != NULL);
 
                if (!PRETTY_PAREN(context) || j->alias != NULL)
                        appendStringInfoChar(buf, '(');
index 876605573c1e9c7dbdd1e93aa7fcb2df8561c9ed..7ea97d0c8e5ed505482c3c7e284c7811c0e945c6 100644 (file)
@@ -1263,7 +1263,7 @@ interval_support(PG_FUNCTION_ARGS)
 
                typmod = (Node *) lsecond(expr->args);
 
-               if (IsA(typmod, Const) &&!((Const *) typmod)->constisnull)
+               if (IsA(typmod, Const) && !((Const *) typmod)->constisnull)
                {
                        Node       *source = (Node *) linitial(expr->args);
                        int32           new_typmod = DatumGetInt32(((Const *) typmod)->constvalue);
index c3257553bdbc32a5af7b8412f0b2bac6100c27cf..f0c6a44b842509f0ecccd8a8ced4b3635b999321 100644 (file)
@@ -713,7 +713,7 @@ varbit_support(PG_FUNCTION_ARGS)
 
                typmod = (Node *) lsecond(expr->args);
 
-               if (IsA(typmod, Const) &&!((Const *) typmod)->constisnull)
+               if (IsA(typmod, Const) && !((Const *) typmod)->constisnull)
                {
                        Node       *source = (Node *) linitial(expr->args);
                        int32           new_typmod = DatumGetInt32(((Const *) typmod)->constvalue);
index 39acfdff6c1d905ad544cf37d05d11dab82e384a..b595ab9569cfd768d76e75a4c0ac50f0e995c992 100644 (file)
@@ -572,7 +572,7 @@ varchar_support(PG_FUNCTION_ARGS)
 
                typmod = (Node *) lsecond(expr->args);
 
-               if (IsA(typmod, Const) &&!((Const *) typmod)->constisnull)
+               if (IsA(typmod, Const) && !((Const *) typmod)->constisnull)
                {
                        Node       *source = (Node *) linitial(expr->args);
                        int32           old_typmod = exprTypmod(source);
index f178d6ac219500b9056318b96c2f3ae06a223954..ac81151acc9d117997be3dc4637a19841d1acec3 100644 (file)
@@ -396,7 +396,7 @@ _PrintFileData(ArchiveHandle *AH, char *filename)
        }
 
        free(buf);
-       if (cfclose(cfp) !=0)
+       if (cfclose(cfp) != 0)
                fatal("could not close data file \"%s\": %m", filename);
 }
 
index 1e931a56cb655e7546e664181fc6ffb4aa38c2fd..eb018854a5c5594987458f0b303cb9beea56afa1 100644 (file)
@@ -4191,7 +4191,7 @@ _complete_from_query(const char *simple_query,
                         */
                        if (strcmp(schema_query->catname,
                                           "pg_catalog.pg_class c") == 0 &&
-                               strncmp(text, "pg_", 3) !=0)
+                               strncmp(text, "pg_", 3) != 0)
                        {
                                appendPQExpBufferStr(&query_buffer,
                                                                         " AND c.relnamespace <> (SELECT oid FROM"
index aa917d0fc9dd3cfe07234ea06a4e7fa832fc045a..9326f805366dd7b1bb79469c5fac919ca4bde188 100644 (file)
@@ -129,7 +129,7 @@ IsValidJsonNumber(const char *str, int len)
         */
        if (*str == '-')
        {
-               dummy_lex.input = unconstify(char *, str) +1;
+               dummy_lex.input = unconstify(char *, str) + 1;
                dummy_lex.input_length = len - 1;
        }
        else
index 59e8e3a8258bc2f804ae7c522b7c5f994741cf2d..6961d7c75b4dc7fb74b913d1febcee13904d62c2 100644 (file)
@@ -132,7 +132,7 @@ next_insert(char *text, int pos, bool questionmarks, bool std_strings)
                                for (i = p + 1; isdigit((unsigned char) text[i]); i++)
                                         /* empty loop body */ ;
                                if (!isalpha((unsigned char) text[i]) &&
-                                       isascii((unsigned char) text[i]) &&text[i] != '_')
+                                       isascii((unsigned char) text[i]) && text[i] != '_')
                                        /* not dollar delimited quote */
                                        return p;
                        }
index b9653c01feafe92941ec80c731ce642379a67b62..ea1146f520f34e64f61603355412622181ad0c15 100644 (file)
@@ -132,7 +132,7 @@ replace_variables(char **text, int lineno)
 
                        for (len = 1; (*text)[ptr + len] && isvarchar((*text)[ptr + len]); len++)
                                 /* skip */ ;
-                       if (!(newcopy = (char *) ecpg_alloc(strlen(*text) -len + strlen(buffer) + 1, lineno)))
+                       if (!(newcopy = (char *) ecpg_alloc(strlen(*text) - len + strlen(buffer) + 1, lineno)))
                        {
                                ecpg_free(buffer);
                                return false;
index df1ac209f91839c5dc814e6a4ef0998c391b4139..34634da1ede910bb064a728995f75be158f632fa 100644 (file)
@@ -513,7 +513,7 @@ pgtls_verify_peer_name_matches_certificate_guts(PGconn *conn,
                                                                                                int *names_examined,
                                                                                                char **first_name)
 {
-       STACK_OF(GENERAL_NAME) *peer_san;
+       STACK_OF(GENERAL_NAME) * peer_san;
        int                     i;
        int                     rc = 0;
 
index aeb6c8fefc2f2e30e7c86df066722d4d6bf6f8b5..9a87cd70f1edcca7b7e65a2de18e1d5ed9efc127 100644 (file)
@@ -8164,8 +8164,8 @@ exec_save_simple_expr(PLpgSQL_expr *expr, CachedPlan *cplan)
                        if (IsA(tle_expr, Const))
                                break;
                        /* Otherwise, it had better be a Param or an outer Var */
-                       Assert(IsA(tle_expr, Param) ||(IsA(tle_expr, Var) &&
-                                                                                  ((Var *) tle_expr)->varno == OUTER_VAR));
+                       Assert(IsA(tle_expr, Param) || (IsA(tle_expr, Var) &&
+                                                                                       ((Var *) tle_expr)->varno == OUTER_VAR));
                        /* Descend to the child node */
                        plan = plan->lefttree;
                }
index 333f27300aa4f1b7b65f4ff285850a2272e8b62d..787f0b69d6309c2a680b1795cf449f18f276c4cb 100644 (file)
@@ -138,7 +138,7 @@ detzcode(const char *const codep)
                 * Do two's-complement negation even on non-two's-complement machines.
                 * If the result would be minval - 1, return minval.
                 */
-               result -= !TWOS_COMPLEMENT(int32) &&result != 0;
+               result -= !TWOS_COMPLEMENT(int32) && result != 0;
                result += minval;
        }
        return result;
@@ -152,7 +152,7 @@ detzcode64(const char *const codep)
        int64           one = 1;
        int64           halfmaxval = one << (64 - 2);
        int64           maxval = halfmaxval - 1 + halfmaxval;
-       int64           minval = -TWOS_COMPLEMENT(int64) -maxval;
+       int64           minval = -TWOS_COMPLEMENT(int64) - maxval;
 
        result = codep[0] & 0x7f;
        for (i = 1; i < 8; ++i)
@@ -164,7 +164,7 @@ detzcode64(const char *const codep)
                 * Do two's-complement negation even on non-two's-complement machines.
                 * If the result would be minval - 1, return minval.
                 */
-               result -= !TWOS_COMPLEMENT(int64) &&result != 0;
+               result -= !TWOS_COMPLEMENT(int64) && result != 0;
                result += minval;
        }
        return result;
@@ -173,7 +173,7 @@ detzcode64(const char *const codep)
 static bool
 differ_by_repeat(const pg_time_t t1, const pg_time_t t0)
 {
-       if (TYPE_BIT(pg_time_t) -TYPE_SIGNED(pg_time_t) <SECSPERREPEAT_BITS)
+       if (TYPE_BIT(pg_time_t) - TYPE_SIGNED(pg_time_t) < SECSPERREPEAT_BITS)
                return 0;
        return t1 - t0 == SECSPERREPEAT;
 }
@@ -1480,7 +1480,7 @@ timesub(const pg_time_t *timep, int32 offset,
                int                     leapdays;
 
                tdelta = tdays / DAYSPERLYEAR;
-               if (!((!TYPE_SIGNED(pg_time_t) ||INT_MIN <= tdelta)
+               if (!((!TYPE_SIGNED(pg_time_t) || INT_MIN <= tdelta)
                          && tdelta <= INT_MAX))
                        goto out_of_range;
                idelta = tdelta;
index 380b4888a5e550fe1f6aced7c19fb2fcb60d61b4..4b942c393a34457fdb7fa73be906ab62d6273372 100644 (file)
@@ -505,7 +505,7 @@ _fmt(const char *format, const struct pg_tm *t, char *pt,
 static char *
 _conv(int n, const char *format, char *pt, const char *ptlim)
 {
-       char            buf[INT_STRLEN_MAXIMUM(int) +1];
+       char            buf[INT_STRLEN_MAXIMUM(int) + 1];
 
        sprintf(buf, format, n);
        return _add(buf, pt, ptlim);
index c27fb456d05972da0e4865139eebb8c5cc75005f..9df81824a0f09b7e54e8c3ed20f4987d858dc572 100644 (file)
@@ -652,7 +652,7 @@ main(int argc, char **argv)
        umask(umask(S_IWGRP | S_IWOTH) | (S_IWGRP | S_IWOTH));
 #endif
        progname = argv[0];
-       if (TYPE_BIT(zic_t) <64)
+       if (TYPE_BIT(zic_t) < 64)
        {
                fprintf(stderr, "%s: %s\n", progname,
                                _("wild compilation-time specification of zic_t"));
@@ -3444,7 +3444,7 @@ yearistype(zic_t year, const char *type)
        if (type == NULL || *type == '\0')
                return true;
        buf = emalloc(1 + 4 * strlen(yitcommand) + 2
-                                 + INT_STRLEN_MAXIMUM(zic_t) +2 + 4 * strlen(type) + 2);
+                                 + INT_STRLEN_MAXIMUM(zic_t) + 2 + 4 * strlen(type) + 2);
        b = shellquote(buf, yitcommand);
        *b++ = ' ';
        b += sprintf(b, INT64_FORMAT, year);
index d726a69a5ef78c335cb6058c1fb5862cc9eca454..457e3288248446428160b3a2a47be8f7fc739dc9 100755 (executable)
@@ -12,7 +12,7 @@ use IO::Handle;
 use Getopt::Long;
 
 # Update for pg_bsd_indent version
-my $INDENT_VERSION = "2.1";
+my $INDENT_VERSION = "2.1.1";
 
 # Our standard indent settings
 my $indent_opts =
@@ -79,7 +79,7 @@ sub check_indent
                exit 1;
        }
 
-       if (`$indent --version` !~ m/ $INDENT_VERSION$/)
+       if (`$indent --version` !~ m/ $INDENT_VERSION /)
        {
                print STDERR
                  "You do not appear to have $indent version $INDENT_VERSION installed on your system.\n";