Remove duplicate variable initializations identified by clang static checker.
One of these represents a nontrivial bug (a promptly-leaked palloc), so backpatch. Greg Stark
This commit is contained in:
parent
3f2fa308d1
commit
ba5317237f
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/tsearch/regis.c,v 1.7 2009/06/11 14:49:03 momjian Exp $
|
* $PostgreSQL: pgsql/src/backend/tsearch/regis.c,v 1.7.2.1 2009/08/30 16:53:37 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -182,7 +182,7 @@ RS_free(Regis *r)
|
|||||||
static bool
|
static bool
|
||||||
mb_strchr(char *str, char *c)
|
mb_strchr(char *str, char *c)
|
||||||
{
|
{
|
||||||
int clen = pg_mblen(c),
|
int clen,
|
||||||
plen,
|
plen,
|
||||||
i;
|
i;
|
||||||
char *ptr = str;
|
char *ptr = str;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/tsearch/ts_parse.c,v 1.12 2009/06/11 14:49:03 momjian Exp $
|
* $PostgreSQL: pgsql/src/backend/tsearch/ts_parse.c,v 1.12.2.1 2009/08/30 16:53:37 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -102,7 +102,6 @@ LexizeAddLemm(LexizeData *ld, int type, char *lemm, int lenlemm)
|
|||||||
{
|
{
|
||||||
ParsedLex *newpl = (ParsedLex *) palloc(sizeof(ParsedLex));
|
ParsedLex *newpl = (ParsedLex *) palloc(sizeof(ParsedLex));
|
||||||
|
|
||||||
newpl = (ParsedLex *) palloc(sizeof(ParsedLex));
|
|
||||||
newpl->type = type;
|
newpl->type = type;
|
||||||
newpl->lemm = lemm;
|
newpl->lemm = lemm;
|
||||||
newpl->lenlemm = lenlemm;
|
newpl->lenlemm = lenlemm;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/utils/adt/encode.c,v 1.23 2009/01/01 17:23:49 momjian Exp $
|
* $PostgreSQL: pgsql/src/backend/utils/adt/encode.c,v 1.23.2.1 2009/08/30 16:53:37 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -159,7 +159,7 @@ hex_decode(const char *src, unsigned len, char *dst)
|
|||||||
*srcend;
|
*srcend;
|
||||||
char v1,
|
char v1,
|
||||||
v2,
|
v2,
|
||||||
*p = dst;
|
*p;
|
||||||
|
|
||||||
srcend = src + len;
|
srcend = src + len;
|
||||||
s = src;
|
s = src;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user