aboutsummaryrefslogtreecommitdiff
path: root/src/gridinfo.cpp
diff options
context:
space:
mode:
authorAndrew Bell <andrew.bell.ia@gmail.com>2019-05-15 10:47:03 -0400
committerAndrew Bell <andrew.bell.ia@gmail.com>2019-05-15 10:47:03 -0400
commit8f268409d37cea329d263e177b83e42f8384d3c7 (patch)
treec4d0f3dd19456600f718a6e0c8573577f433549b /src/gridinfo.cpp
parent886ced02f0aaab5d66d16459435f7447cf976650 (diff)
parentd67203a6f76a74f5ac029ff052dbcc72e3b59624 (diff)
downloadPROJ-8f268409d37cea329d263e177b83e42f8384d3c7.tar.gz
PROJ-8f268409d37cea329d263e177b83e42f8384d3c7.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src/gridinfo.cpp')
-rw-r--r--src/gridinfo.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gridinfo.cpp b/src/gridinfo.cpp
index 14759557..7f7d930f 100644
--- a/src/gridinfo.cpp
+++ b/src/gridinfo.cpp
@@ -36,7 +36,6 @@
#include <string.h>
#include "proj_internal.h"
-#include "proj_internal.h"
/************************************************************************/
/* swap_words() */
@@ -851,7 +850,6 @@ static int pj_gridinfo_init_gtx( projCtx ctx, PAFile fid, PJ_GRIDINFO *gi )
PJ_GRIDINFO *pj_gridinfo_init( projCtx ctx, const char *gridname )
{
- char fname[MAX_PATH_FILENAME+1];
PJ_GRIDINFO *gilist;
PAFile fp;
char header[160];
@@ -885,13 +883,12 @@ PJ_GRIDINFO *pj_gridinfo_init( projCtx ctx, const char *gridname )
/* -------------------------------------------------------------------- */
/* Open the file using the usual search rules. */
/* -------------------------------------------------------------------- */
- strcpy(fname, gridname);
- if (!(fp = pj_open_lib(ctx, fname, "rb"))) {
+ if (!(fp = pj_open_lib(ctx, gridname, "rb"))) {
ctx->last_errno = 0; /* don't treat as a persistent error */
return gilist;
}
- gilist->filename = pj_strdup(fname);
+ gilist->filename = pj_strdup(gridname);
if (!gilist->filename) {
pj_dalloc(gilist->gridname);
pj_dalloc(gilist);