summaryrefslogtreecommitdiff
path: root/src/common/grfio.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-12-26 02:28:59 +0100
committerHaru <haru@dotalux.com>2016-05-08 19:53:57 +0200
commit2349b2a1528fe5dc41d930f8dd332df5ba521eb6 (patch)
tree3656a91a896f0ef090606b2b4c9184ad73153a3f /src/common/grfio.c
parent58a7bf46508b7f186704e7efb39576e09f0ab866 (diff)
downloadhercules-2349b2a1528fe5dc41d930f8dd332df5ba521eb6.tar.gz
hercules-2349b2a1528fe5dc41d930f8dd332df5ba521eb6.tar.bz2
hercules-2349b2a1528fe5dc41d930f8dd332df5ba521eb6.tar.xz
hercules-2349b2a1528fe5dc41d930f8dd332df5ba521eb6.zip
Fixed various issues pointed out by cppcheck
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/grfio.c')
-rw-r--r--src/common/grfio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/grfio.c b/src/common/grfio.c
index 678875c91..c6e47d357 100644
--- a/src/common/grfio.c
+++ b/src/common/grfio.c
@@ -410,12 +410,12 @@ void *grfio_reads(const char *fname, int *size)
// LocalFileCheck
char lfname[256];
FILE *in;
- unsigned char *buf = NULL;
grfio_localpath_create(lfname, sizeof(lfname), (entry && entry->fnd) ? entry->fnd : fname);
in = fopen(lfname, "rb");
if (in != NULL) {
int declen;
+ unsigned char *buf = NULL;
fseek(in,0,SEEK_END);
declen = (int)ftell(in);
if (declen == -1) {