From: adam@algroup.co.uk Date: Thu, 4 Feb 2010 23:31:23 +0000 (+0000) Subject: oops. in the spirit of cleaner code, don't do stuff twice! X-Git-Tag: v1.0.0~388 X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/502def6d63e97a1f5d4aa4799e6c511ab8a40374?ds=inline oops. in the spirit of cleaner code, don't do stuff twice! --- diff --git a/armsrc/appmain.c b/armsrc/appmain.c index f69bdccc..e5cd16b7 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -569,12 +569,12 @@ void UsbPacketReceived(BYTE *packet, int len) { UsbCommand *c = (UsbCommand *)packet; UsbCommand ack; + ack.cmd = CMD_ACK; switch(c->cmd) { #ifdef WITH_LF case CMD_ACQUIRE_RAW_ADC_SAMPLES_125K: AcquireRawAdcSamples125k(c->arg[0]); - ack.cmd = CMD_ACK; UsbSendPacket((BYTE*)&ack, sizeof(ack)); break; #endif @@ -725,7 +725,6 @@ void UsbPacketReceived(BYTE *packet, int len) BYTE *b = (BYTE *)BigBuf; memcpy(b+c->arg[0], c->d.asBytes, 48); //Dbprintf("copied 48 bytes to %i",b+c->arg[0]); - ack.cmd = CMD_ACK; UsbSendPacket((BYTE*)&ack, sizeof(ack)); break; }