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

Commite2c16b2

Browse files
committed
pathman: bugfixes
1 parentaec8e37 commite2c16b2

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

‎contrib/pathman/pathman.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,9 @@ handle_boolexpr(const BoolExpr *expr, const PartRelationInfo *prel)
649649
List*ret=ALL;
650650
List*b=ALL;
651651

652+
if (expr->boolop==AND_EXPR)
653+
ret=list_make1_int(make_range(0,RANGE_INFINITY));
654+
652655
foreach (lc,expr->args)
653656
{
654657
b=walk_expr_tree((Expr*)lfirst(lc),prel);

‎contrib/pathman/rangeset.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,23 @@ intersect_ranges(List *a, List *b)
7070
List*new_list=NIL;
7171
intlow,high;
7272

73+
/* if a or b (or both) are empty then intersections is also empty */
74+
if (!a|| !b)
75+
{
76+
if (a)
77+
pfree(a);
78+
if (b)
79+
pfree(b);
80+
returnNIL;
81+
}
82+
7383
foreach(lcb,b)
7484
{
7585
IndexRangerb= (IndexRange)lfirst_int(lcb);
7686

7787
/* if "a" is empty then initialize it with infinite range */
78-
if (a==NIL)
79-
a=list_make1_int(make_range(0,RANGE_INFINITY));
88+
//if (a == NIL)
89+
//a = list_make1_int(make_range(0, RANGE_INFINITY));
8090

8191
/* intersect entry from "b" and every entry in "a" */
8292
foreach(lca,a)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp