X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/c0e6c18bf5e0a25d57a14dd04224f4a02fd1c675..14edfd09c3dca127eb09393c0798e66f899adf28:/client/loclass/fileutils.c?ds=sidebyside diff --git a/client/loclass/fileutils.c b/client/loclass/fileutils.c index 6475c126..8ec52cfe 100644 --- a/client/loclass/fileutils.c +++ b/client/loclass/fileutils.c @@ -76,14 +76,14 @@ int saveFile(const char *preferredName, const char *suffix, const void* data, si /* We should have a valid filename now, e.g. dumpdata-3.bin */ /*Opening file for writing in binary mode*/ - FILE *fh=fopen(fileName,"wb"); - if(!fh) { + FILE *fileHandle=fopen(fileName,"wb"); + if(!fileHandle) { PrintAndLog("Failed to write to file '%s'", fileName); - free(fh); + free(fileName); return 1; } - fwrite(data, 1, datalen, fh); - fclose(fh); + fwrite(data, 1, datalen, fileHandle); + fclose(fileHandle); PrintAndLog("Saved data to '%s'", fileName); free(fileName);