]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/loclass/fileutils.c
CHG: The input handling for "hf 14b write" is now correct. Thanks Asper for spotting...
[proxmark3-svn] / client / loclass / fileutils.c
index 6475c126b8c1fb4270321f91ae1553c291cac34a..8ec52cfeb8d4da51c86797362dc473cf1df4f128 100644 (file)
@@ -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);
 
Impressum, Datenschutz