Skip to content

Commit

Permalink
prepare GPX reader
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jul 30, 2024
1 parent 1a69441 commit 8631a16
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion hcxpcapngtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -5647,9 +5647,20 @@ return;
static bool processgpxfile(char *gpxinname)
{
static FILE *fh_gpxin;
static struct stat statinfo;
static int *gpxstart;

if(stat(gpxinname, &statinfo) != 0) return false;
if(statinfo.st_size == 0) return false;
if((gpxstart = calloc(1, statinfo.st_size)) == NULL) return false;
if((fh_gpxin = fopen(gpxinname, "r")) == NULL)
{
free(gpxstart);
return false;
}

if((fh_gpxin = fopen(gpxinname, "r")) == NULL) return false;

free(gpxstart);
fclose(fh_gpxin);
return true;
}
Expand Down

0 comments on commit 8631a16

Please sign in to comment.