mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
Reduce open() calls. Replace fopen() calls with calls to fd.c functions.
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: geqo_params.c,v 1.4 1997/08/12 22:53:09 momjian Exp $
|
||||
* $Id: geqo_params.c,v 1.5 1997/08/18 02:14:41 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -43,6 +43,8 @@
|
||||
#include "optimizer/geqo_gene.h"
|
||||
#include "optimizer/geqo.h"
|
||||
|
||||
#include "storage/fd.h"
|
||||
|
||||
#define POOL_TAG "Pool_Size"
|
||||
#define TRIAL_TAG "Generations"
|
||||
#define RAND_TAG "Random_Seed"
|
||||
@ -89,7 +91,7 @@ geqo_params(int string_length)
|
||||
sprintf(conf_file, "%s/%s", DataDir, GEQO_FILE);
|
||||
|
||||
/* open the config file */
|
||||
file = fopen(conf_file, "r");
|
||||
file = AllocateFile(conf_file, "r");
|
||||
if (file)
|
||||
{
|
||||
/*
|
||||
@ -187,7 +189,7 @@ geqo_params(int string_length)
|
||||
}
|
||||
}
|
||||
|
||||
fclose(file);
|
||||
FreeFile(file);
|
||||
|
||||
pfree(conf_file);
|
||||
}
|
||||
|
Reference in New Issue
Block a user