]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
oops. in the spirit of cleaner code, don't do stuff twice!
authoradam@algroup.co.uk <adam@algroup.co.uk@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Thu, 4 Feb 2010 23:31:23 +0000 (23:31 +0000)
committeradam@algroup.co.uk <adam@algroup.co.uk@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Thu, 4 Feb 2010 23:31:23 +0000 (23:31 +0000)
armsrc/appmain.c

index f69bdccc16dee5aa9277f1580a48847bb32cef19..e5cd16b74389e22322c1070fb8415bcee788e055 100644 (file)
@@ -569,12 +569,12 @@ void UsbPacketReceived(BYTE *packet, int len)
 {\r
        UsbCommand *c = (UsbCommand *)packet;\r
        UsbCommand ack;\r
+       ack.cmd = CMD_ACK;\r
 \r
        switch(c->cmd) {\r
 #ifdef WITH_LF\r
                case CMD_ACQUIRE_RAW_ADC_SAMPLES_125K:\r
                        AcquireRawAdcSamples125k(c->arg[0]);\r
-                       ack.cmd = CMD_ACK;\r
                        UsbSendPacket((BYTE*)&ack, sizeof(ack));\r
                        break;\r
 #endif\r
@@ -725,7 +725,6 @@ void UsbPacketReceived(BYTE *packet, int len)
                        BYTE *b = (BYTE *)BigBuf;\r
                        memcpy(b+c->arg[0], c->d.asBytes, 48);\r
                        //Dbprintf("copied 48 bytes to %i",b+c->arg[0]);\r
-                       ack.cmd = CMD_ACK;\r
                        UsbSendPacket((BYTE*)&ack, sizeof(ack));\r
                        break;\r
                }\r
Impressum, Datenschutz