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

Commitdd6de24

Browse files
committed
Remove duplicate variable initializations identified by clang static checker.
One of these represents a nontrivial bug (a promptly-leaked palloc), sobackpatch.Greg Stark
1 parente710b65 commitdd6de24

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

‎src/backend/tsearch/regis.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/tsearch/regis.c,v 1.7 2009/06/11 14:49:03 momjian Exp $
10+
* $PostgreSQL: pgsql/src/backend/tsearch/regis.c,v 1.8 2009/08/30 16:53:31 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -182,7 +182,7 @@ RS_free(Regis *r)
182182
staticbool
183183
mb_strchr(char*str,char*c)
184184
{
185-
intclen=pg_mblen(c),
185+
intclen,
186186
plen,
187187
i;
188188
char*ptr=str;

‎src/backend/tsearch/ts_parse.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/tsearch/ts_parse.c,v 1.14 2009/08/18 10:30:41 teodor Exp $
10+
* $PostgreSQL: pgsql/src/backend/tsearch/ts_parse.c,v 1.15 2009/08/30 16:53:31 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -101,7 +101,6 @@ LexizeAddLemm(LexizeData *ld, int type, char *lemm, int lenlemm)
101101
{
102102
ParsedLex*newpl= (ParsedLex*)palloc(sizeof(ParsedLex));
103103

104-
newpl= (ParsedLex*)palloc(sizeof(ParsedLex));
105104
newpl->type=type;
106105
newpl->lemm=lemm;
107106
newpl->lenlemm=lenlemm;

‎src/backend/utils/adt/encode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/utils/adt/encode.c,v 1.24 2009/08/04 16:08:36 tgl Exp $
10+
* $PostgreSQL: pgsql/src/backend/utils/adt/encode.c,v 1.25 2009/08/30 16:53:31 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -159,7 +159,7 @@ hex_decode(const char *src, unsigned len, char *dst)
159159
*srcend;
160160
charv1,
161161
v2,
162-
*p=dst;
162+
*p;
163163

164164
srcend=src+len;
165165
s=src;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp