Make file_stat argument to FcDirCacheLoadFile optional.

Allow file_stat to be NULL by using a local stat structure in that case.
This commit is contained in:
Keith Packard 2007-11-03 14:16:29 -07:00
parent 2ddce88cde
commit e37d10fa74
1 changed files with 3 additions and 0 deletions

View File

@ -559,7 +559,10 @@ FcDirCacheLoadFile (const FcChar8 *cache_file, struct stat *file_stat)
{ {
int fd; int fd;
FcCache *cache; FcCache *cache;
struct stat my_file_stat;
if (!file_stat)
file_stat = &my_file_stat;
fd = FcDirCacheOpenFile (cache_file, file_stat); fd = FcDirCacheOpenFile (cache_file, file_stat);
if (fd < 0) if (fd < 0)
return NULL; return NULL;