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

Commitd42294f

Browse files
committed
Fix compiler warning
from gcc-7 -Wformat-truncation (via -Wall)
1 parentbe87b70 commitd42294f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/bin/initdb/initdb.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,12 +1009,12 @@ static char *
10091009
pretty_wal_size(intsegment_count)
10101010
{
10111011
intsz=wal_segment_size_mb*segment_count;
1012-
char*result=pg_malloc(10);
1012+
char*result=pg_malloc(11);
10131013

10141014
if ((sz %1024)==0)
1015-
snprintf(result,10,"%dGB",sz /1024);
1015+
snprintf(result,11,"%dGB",sz /1024);
10161016
else
1017-
snprintf(result,10,"%dMB",sz);
1017+
snprintf(result,11,"%dMB",sz);
10181018

10191019
returnresult;
10201020
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp