Skip to content

Commit 39e2875

Browse files
Use a less generic name to avoid collision segfaults (#7214)
1 parent ca30752 commit 39e2875

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/fread.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ const char typeName[NUMTYPE][10] = { "drop", "bool8", "bool8", "bool8", "bool8",
7878
int8_t typeSize[NUMTYPE] = { 0, 1, 1, 1, 1, 1, 1, 4, 8, 8, 8, 8, 4, 8 , 8 };
7979

8080
// In AIX, NAN and INFINITY don't qualify as constant literals. Refer: PR #3043
81-
// So we assign them through below init function.
81+
// So we assign them through below init_const_literals function.
8282
static double NAND;
8383
static double INFD;
8484

8585
// NAN and INFINITY constants are float, so cast to double once up front.
86-
static void init(void)
86+
static void init_const_literals(void)
8787
{
8888
NAND = (double)NAN;
8989
INFD = (double)INFINITY;
@@ -829,7 +829,7 @@ static void parse_double_regular(FieldParseContext *ctx)
829829
*/
830830
static void parse_double_extended(FieldParseContext *ctx)
831831
{
832-
init();
832+
init_const_literals();
833833

834834
double* target = ctx->targets[sizeof(double)];
835835
const char *ch = *ctx->ch;
@@ -916,7 +916,7 @@ static void parse_double_extended(FieldParseContext *ctx)
916916
*/
917917
static void parse_double_hexadecimal(FieldParseContext *ctx)
918918
{
919-
init();
919+
init_const_literals();
920920

921921
const char *ch = *ctx->ch;
922922
double *target = ctx->targets[sizeof(double)];

0 commit comments

Comments
 (0)