FIX: Possible usage of NULL.

This commit is contained in:
iceman1001 2016-01-25 20:19:47 +01:00
commit 5f5254d631

View file

@ -1388,8 +1388,7 @@ static void TransmitIClassCommand(const uint8_t *cmd, int len, int *samples, int
AT91C_BASE_SSC->SSC_THR = 0x00; AT91C_BASE_SSC->SSC_THR = 0x00;
FpgaSetupSsc(); FpgaSetupSsc();
if (wait) if (wait) {
{
if(*wait < 10) *wait = 10; if(*wait < 10) *wait = 10;
for(c = 0; c < *wait;) { for(c = 0; c < *wait;) {
@ -1403,7 +1402,6 @@ static void TransmitIClassCommand(const uint8_t *cmd, int len, int *samples, int
} }
WDT_HIT(); WDT_HIT();
} }
} }
@ -1437,7 +1435,7 @@ static void TransmitIClassCommand(const uint8_t *cmd, int len, int *samples, int
} }
WDT_HIT(); WDT_HIT();
} }
if (samples) *samples = (c + *wait) << 3; if (samples && wait) *samples = (c + *wait) << 3;
} }