diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2012-02-28 20:40:24 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2012-02-28 20:40:24 +0000 |
commit | bb85d083a7899890d0c14502078f6fa60a09d5df (patch) | |
tree | 64639b9495a86414aa0cc92917145b41a5f1562e /Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c | |
parent | b762780343dd505f7bfe5673cbcffb0b938d7064 (diff) | |
download | lufa-bb85d083a7899890d0c14502078f6fa60a09d5df.tar.gz lufa-bb85d083a7899890d0c14502078f6fa60a09d5df.tar.bz2 lufa-bb85d083a7899890d0c14502078f6fa60a09d5df.zip |
Fix warnings and errors found by the new cppcheck provided static code analysis.
Diffstat (limited to 'Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c')
-rw-r--r-- | Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c | 19 |
1 files changed, 8 insertions, 11 deletions
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(); } |