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

Commit846ea08

Browse files
committed
Oops, sometimes strtol isn't called in pg_atoi, so we do need that badp
check.
1 parent7aee5ed commit846ea08

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.50 2002/07/1617:55:25 momjian Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.51 2002/07/1618:34:16 momjian Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -46,7 +46,7 @@ int32
4646
pg_atoi(char*s,intsize,intc)
4747
{
4848
longl=0;
49-
char*badp;
49+
char*badp=NULL;
5050

5151
Assert(s);
5252

@@ -71,7 +71,7 @@ pg_atoi(char *s, int size, int c)
7171
*/
7272
if (errno&&errno!=EINVAL)
7373
elog(ERROR,"pg_atoi: error reading \"%s\": %m",s);
74-
if (*badp&&*badp!=c)
74+
if (badp&&*badp&&*badp!=c)
7575
elog(ERROR,"pg_atoi: error in \"%s\": can\'t parse \"%s\"",s,badp);
7676

7777
switch (size)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp