From 2349b2a1528fe5dc41d930f8dd332df5ba521eb6 Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 26 Dec 2015 02:28:59 +0100 Subject: Fixed various issues pointed out by cppcheck Signed-off-by: Haru --- src/common/grfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/grfio.c') 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) { -- cgit v1.2.3-70-g09d2