1
0
Fork 0
forked from len0rd/rockbox

Correct wrong usage of event callbacks all over the place. It's not supposed to return anything, and should take a data parameter.

Fixing it because correcting the event api prototypes causes many warnings.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23301 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2009-10-20 21:54:44 +00:00
parent 872852639f
commit 774bacc692
13 changed files with 51 additions and 50 deletions

View file

@ -306,22 +306,19 @@ static unsigned int charge_state(void)
#endif
static bool flush_buffer(void)
static void flush_buffer(void* data)
{
(void)data;
int fd, secs;
unsigned int i;
/* don't access the disk when in usb mode, or when no data is available */
if (in_usb_mode || (buf_idx == 0))
{
return false;
}
return;
fd = rb->open(BATTERY_LOG, O_RDWR | O_CREAT | O_APPEND);
if (fd < 0)
{
return false;
}
return;
for (i = 0; i < buf_idx; i++)
{
@ -357,7 +354,6 @@ static bool flush_buffer(void)
rb->close(fd);
buf_idx = 0;
return true;
}
@ -395,7 +391,7 @@ void thread(void)
for this to occur because it requires > 16 hours of no disk activity.
*/
if (buf_idx == BUF_ELEMENTS) {
flush_buffer();
flush_buffer(NULL);
}
/* sleep some time until next measurement */