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

Commit3848d21

Browse files
committed
Make memset() use sizeof() rather than re-compute size
This is simpler and more closely follows overwhelming precedent.Report and patch by Mark Dilger.Discussion:https://postgr.es/m/9A68FB88-5F45-4848-9926-8586E2D777D1@gmail.com
1 parent414cd43 commit3848d21

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/backend/statistics/extended_stats.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,9 @@ statext_store(Relation pg_stext, Oid statOid,
301301
boolnulls[Natts_pg_statistic_ext];
302302
boolreplaces[Natts_pg_statistic_ext];
303303

304-
memset(nulls,1,Natts_pg_statistic_ext*sizeof(bool));
305-
memset(replaces,0,Natts_pg_statistic_ext*sizeof(bool));
306-
memset(values,0,Natts_pg_statistic_ext*sizeof(Datum));
304+
memset(nulls,true,sizeof(nulls));
305+
memset(replaces,false,sizeof(replaces));
306+
memset(values,0,sizeof(values));
307307

308308
/*
309309
* Construct a new pg_statistic_ext tuple, replacing the calculated stats.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp