ipods: fix DEBUG builds

iap-core.h defines LOGF_ENABLE unconditionally but hexstring()
helper function was not compiled if logf support was not
selected in configure. The regular builds worked by accident
because logf() lines where discarded by preprocessor.

Change-Id: Id76af478e7c760d81168ebf9bf3eb973a679987c
This commit is contained in:
Marcin Bukat 2014-01-16 08:12:29 +01:00
parent 47f648fd92
commit 7f5dce4116

View file

@ -511,7 +511,7 @@ void iap_send_tx(void)
} }
*(iap_txnext) = 0x100 - (chksum & 0xFF); *(iap_txnext) = 0x100 - (chksum & 0xFF);
#ifdef LOGF_ENABLE #if defined(LOGF_ENABLE) && defined(ROCKBOX_HAS_LOGF)
logf("T: %s", hexstring(txstart+3, (iap_txnext - txstart)-3)); logf("T: %s", hexstring(txstart+3, (iap_txnext - txstart)-3));
#endif #endif
for (i=0; i <= (iap_txnext - txstart); i++) for (i=0; i <= (iap_txnext - txstart); i++)
@ -1253,7 +1253,7 @@ void iap_handlepkt(void)
/* handle command by mode */ /* handle command by mode */
length = get_u16(iap_rxstart); length = get_u16(iap_rxstart);
#ifdef LOGF_ENABLE #if defined(LOGF_ENABLE) && defined(ROCKBOX_HAS_LOGF)
logf("R: %s", hexstring(iap_rxstart+2, (length))); logf("R: %s", hexstring(iap_rxstart+2, (length)));
#endif #endif