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

Commit5b1b3ef

Browse files
committed
Adjust mbutils.c so it won't get broken by future pgindent runs.
To do that, replace L'\0' by (WCHAR) 0. Perhaps someday we should teachpgindent about wide-character literals, but so long as this is the onlyuse-case in the entire Postgres sources, a workaround seems easier.
1 parente324348 commit5b1b3ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/backend/utils/mb/mbutils.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Tatsuo Ishii
66
*
7-
* $PostgreSQL: pgsql/src/backend/utils/mb/mbutils.c,v 1.97 2010/07/06 21:09:00 tgl Exp $
7+
* $PostgreSQL: pgsql/src/backend/utils/mb/mbutils.c,v 1.98 2010/07/07 15:13:21 tgl Exp $
88
*/
99
#include"postgres.h"
1010

@@ -1016,7 +1016,7 @@ pgwin32_toUTF16(const char *str, int len, int *utf16len)
10161016
{
10171017
utf16= (WCHAR*)palloc(sizeof(WCHAR)* (len+1));
10181018
dstlen=MultiByteToWideChar(codepage,0,str,len,utf16,len);
1019-
utf16[dstlen]=L'\0';
1019+
utf16[dstlen]=(WCHAR)0;
10201020
}
10211021
else
10221022
{
@@ -1029,7 +1029,7 @@ pgwin32_toUTF16(const char *str, int len, int *utf16len)
10291029

10301030
utf16= (WCHAR*)palloc(sizeof(WCHAR)* (len+1));
10311031
dstlen=MultiByteToWideChar(CP_UTF8,0,utf8,len,utf16,len);
1032-
utf16[dstlen]=L'\0';
1032+
utf16[dstlen]=(WCHAR)0;
10331033

10341034
if (utf8!=str)
10351035
pfree(utf8);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp