Skip to content

Commit d63de33

Browse files
committed
round() is not portable. Use rint().
1 parent 295e7dc commit d63de33

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/backend/access/gist/gistbuild.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
*/
1515
#include "postgres.h"
1616

17+
#include <math.h>
18+
1719
#include "access/genam.h"
1820
#include "access/gist_private.h"
1921
#include "catalog/index.h"
@@ -420,7 +422,7 @@ calculatePagesPerBuffer(GISTBuildState *buildstate, int levelStep)
420422
*/
421423
pagesPerBuffer = 2 * pow(avgIndexTuplesPerPage, levelStep);
422424

423-
return round(pagesPerBuffer);
425+
return (int) rint(pagesPerBuffer);
424426
}
425427

426428
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy