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

Commita0c2fa9

Browse files
committed
isdigit() needs an unsigned char argument.
Per the C standard, the routine should be passed an int, with a value that'srepresentable as an unsigned char or EOF. Passing a signed char is wrong,because a negative value is not representable as an unsigned char.Unfortunately no compiler warns about that.
1 parent94ae6ba commita0c2fa9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ parse_sane_timezone(struct pg_tm *tm, text *zone)
511511
* as invalid, it's enough to disallow having a digit in the first
512512
* position of our input string.
513513
*/
514-
if (isdigit(*tzname))
514+
if (isdigit((unsignedchar)*tzname))
515515
ereport(ERROR,
516516
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
517517
errmsg("invalid input syntax for numeric time zone: \"%s\"",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp