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

Commit5971718

Browse files
author
Artur Zakirov
committed
Initialize pos1 and pos2 in rum_ts_join_pos()
1 parent86bc9c9 commit5971718

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎rum_ts_utils.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ PG_FUNCTION_INFO_V1(rum_ts_join_pos);
4040
PG_FUNCTION_INFO_V1(tsquery_to_distance_query);
4141

4242
staticintcount_pos(char*ptr,intlen);
43-
staticchar*decompress_pos(char*ptr,uint16*pos);
43+
staticchar*decompress_pos(char*ptr,WordEntryPos*pos);
4444

4545
typedefstruct
4646
{
@@ -317,7 +317,7 @@ rum_tsquery_timestamp_consistent(PG_FUNCTION_ARGS)
317317
#defineLOWERMASK 0x1F
318318

319319
staticint
320-
compress_pos(char*target,uint16*pos,intnpos)
320+
compress_pos(char*target,WordEntryPos*pos,intnpos)
321321
{
322322
inti;
323323
uint16prev=0,
@@ -350,7 +350,7 @@ compress_pos(char *target, uint16 *pos, int npos)
350350
}
351351

352352
staticchar*
353-
decompress_pos(char*ptr,uint16*pos)
353+
decompress_pos(char*ptr,WordEntryPos*pos)
354354
{
355355
inti;
356356
uint8v;
@@ -1328,14 +1328,15 @@ rum_ts_join_pos(PG_FUNCTION_ARGS)
13281328
count2=count_pos(in2,VARSIZE_ANY_EXHDR(addInfo2)),
13291329
countRes=0,
13301330
i1=0,i2=0,size;
1331-
WordEntryPospos1,pos2,*pos;
1331+
WordEntryPospos1=0,
1332+
pos2=0,
1333+
*pos;
13321334

13331335
result=palloc(VARHDRSZ+sizeof(WordEntryPos)* (count1+count2));
13341336
pos=palloc(sizeof(WordEntryPos)* (count1+count2));
13351337

13361338
Assert(count1>0&&count2>0);
13371339

1338-
13391340
in1=decompress_pos(in1,&pos1);
13401341
in2=decompress_pos(in2,&pos2);
13411342

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp