From bb85d083a7899890d0c14502078f6fa60a09d5df Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Tue, 28 Feb 2012 20:40:24 +0000 Subject: Fix warnings and errors found by the new cppcheck provided static code analysis. --- .../StandaloneProgrammer/StandaloneProgrammer.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c') diff --git a/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c b/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c index 1f9f8391d..cc79a8321 100644 --- a/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c +++ b/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c @@ -114,18 +114,15 @@ int main(void) { Programmer_Task(); + #if defined(USB_CAN_BE_HOST) if (USB_CurrentMode == USB_MODE_Host) - { - #if defined(USB_CAN_BE_HOST) - DiskHost_USBTask(); - #endif - } - else - { - #if defined(USB_CAN_BE_DEVICE) - DiskDevice_USBTask(); - #endif - } + DiskHost_USBTask(); + #endif + + #if defined(USB_CAN_BE_DEVICE) + if (USB_CurrentMode == USB_MODE_Device) + DiskDevice_USBTask(); + #endif USB_USBTask(); } -- cgit v1.2.3