]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Fixing warning:
authorAlexis Green <alexis@cessp.it>
Mon, 1 Aug 2016 20:03:46 +0000 (13:03 -0700)
committerAlexis Green <alexis@cessp.it>
Mon, 1 Aug 2016 20:03:46 +0000 (13:03 -0700)
warning: ignoring return va 'scanf', declared with attribute warn_unused_result [-Wunused-result]

client/cmdhflegic.c

index ccdfa1da2675d1f73017cf4b0f332229741bea4f..0adf3c596b8cf1334cbf278c3b9d4c9bed5a0cdb 100644 (file)
@@ -527,8 +527,7 @@ int CmdLegicRfRawWrite(const char *Cmd) {
                PrintAndLog("# changing the DCF is irreversible  #");
                PrintAndLog("#####################################");
                PrintAndLog("do youe really want to continue? y(es) n(o)");             
-               scanf(" %c", &answer);
-               if (answer == 'y' || answer == 'Y') {
+               if (scanf(" %c", &answer) > 0 && (answer == 'y' || answer == 'Y')) {
                        SendCommand(&c);
                        return 0;
                }
Impressum, Datenschutz