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

Commit65a34e9

Browse files
committed
Bring comments back in sync with code.
1 parent73b9465 commit65a34e9

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

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

Lines changed: 15 additions & 5 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.52 2002/08/27 20:29:10 momjian Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.53 2002/08/27 20:54:47 tgl Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -42,19 +42,29 @@
4242
#defineSCHAR_MIN (-SCHAR_MAX-1)
4343
#endif
4444

45+
46+
/*
47+
* pg_atoi: convert string to integer
48+
*
49+
* size is the sizeof() the desired integral result (1, 2, or 4 bytes).
50+
*
51+
* c, if not 0, is the terminator character that may appear after the
52+
* integer. If 0, the string must end after the integer.
53+
*
54+
* Unlike plain atoi(), this will throw elog() upon bad input format or
55+
* overflow.
56+
*/
4557
int32
4658
pg_atoi(char*s,intsize,intc)
4759
{
4860
longl=0;
4961
char*badp=NULL;
5062

51-
Assert(s);
52-
5363
errno=0;
5464

5565
/*
56-
* Some versions of strtol treat the empty string as an error.This
57-
*code will explicitly return 0 foranempty string.
66+
* Some versions of strtol treat the empty string as an error, but some
67+
*seem not to. Makeanexplicit test to be sure we catch it.
5868
*/
5969

6070
if (s== (char*)NULL)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp