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

Commita687976

Browse files
committed
Remove assert-enabled-only variable, cosmetic fix for Assert
1 parent5103be5 commita687976

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

‎src/rum_ts_utils.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,7 @@ decompress_pos(char *ptr, WordEntryPos *pos)
972972
else
973973
{
974974
delta |= (v&LOWERMASK) <<i;
975+
Assert(delta <=0x3fff);
975976
*pos+=delta;
976977
WEP_SETWEIGHT(*pos,v >>5);
977978
returnptr;
@@ -991,7 +992,7 @@ count_pos(char *ptr, int len)
991992
if (!(ptr[i]&HIGHBIT))
992993
count++;
993994
}
994-
Assert(!(ptr[i-1]&HIGHBIT));
995+
Assert((ptr[i-1]&HIGHBIT)==0);
995996
returncount;
996997
}
997998

@@ -2209,7 +2210,6 @@ rum_ts_join_pos(PG_FUNCTION_ARGS)
22092210
count2=count_pos(in2,VARSIZE_ANY_EXHDR(addInfo2)),
22102211
countRes=0;
22112212
inti1=0,i2=0;
2212-
intn_equals=0;
22132213
Sizesize;
22142214
WordEntryPospos1=0,
22152215
pos2=0,
@@ -2243,7 +2243,6 @@ rum_ts_join_pos(PG_FUNCTION_ARGS)
22432243
else
22442244
{
22452245
pos[countRes++]=pos1;
2246-
n_equals++;
22472246
i1++;
22482247
i2++;
22492248
if (i1<count1)
@@ -2276,7 +2275,7 @@ rum_ts_join_pos(PG_FUNCTION_ARGS)
22762275
}
22772276
}
22782277

2279-
Assert(countRes==count1+count2-n_equals);
2278+
Assert(countRes<=count1+count2);
22802279

22812280
/*
22822281
* In some cases compressed positions may take more memory than

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp