diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/pj_gridinfo.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/pj_gridinfo.c b/src/pj_gridinfo.c index d7390847..958396ae 100644 --- a/src/pj_gridinfo.c +++ b/src/pj_gridinfo.c @@ -858,14 +858,10 @@ PJ_GRIDINFO *pj_gridinfo_init( projCtx ctx, const char *gridname ) /* -------------------------------------------------------------------- */ if( pj_ctx_fread( ctx, header, sizeof(header), 1, fp ) != 1 ) { - pj_ctx_fclose( ctx, fp ); - pj_ctx_set_errno( ctx, -38 ); - return gilist; + /* some files may be smaller that sizeof(header), eg 160, so */ + ctx->last_errno = 0; /* don't treat as a persistent error */ } - /* some files may be smaller that sizeof(header), eg 160, so */ - ctx->last_errno = 0; /* don't treat as a persistent error */ - pj_ctx_fseek( ctx, fp, SEEK_SET, 0 ); /* -------------------------------------------------------------------- */ |
