diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-10-20 21:54:44 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-10-20 21:54:44 +0000 |
commit | 774bacc692b4d5c7b769bb88d24e182db9e4656f (patch) | |
tree | 07c5ed05c9d46145c783bd1de5062731e6babb32 /apps/plugins | |
parent | 872852639fc52bcdb2cc8199fed60f81c7cad1f9 (diff) | |
download | rockbox-774bacc692b4d5c7b769bb88d24e182db9e4656f.tar.gz rockbox-774bacc692b4d5c7b769bb88d24e182db9e4656f.zip |
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
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/battery_bench.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c index 909de03512..c0b6d44e9f 100644 --- a/apps/plugins/battery_bench.c +++ b/apps/plugins/battery_bench.c | |||
@@ -306,22 +306,19 @@ static unsigned int charge_state(void) | |||
306 | #endif | 306 | #endif |
307 | 307 | ||
308 | 308 | ||
309 | static bool flush_buffer(void) | 309 | static void flush_buffer(void* data) |
310 | { | 310 | { |
311 | (void)data; | ||
311 | int fd, secs; | 312 | int fd, secs; |
312 | unsigned int i; | 313 | unsigned int i; |
313 | 314 | ||
314 | /* don't access the disk when in usb mode, or when no data is available */ | 315 | /* don't access the disk when in usb mode, or when no data is available */ |
315 | if (in_usb_mode || (buf_idx == 0)) | 316 | if (in_usb_mode || (buf_idx == 0)) |
316 | { | 317 | return; |
317 | return false; | ||
318 | } | ||
319 | 318 | ||
320 | fd = rb->open(BATTERY_LOG, O_RDWR | O_CREAT | O_APPEND); | 319 | fd = rb->open(BATTERY_LOG, O_RDWR | O_CREAT | O_APPEND); |
321 | if (fd < 0) | 320 | if (fd < 0) |
322 | { | 321 | return; |
323 | return false; | ||
324 | } | ||
325 | 322 | ||
326 | for (i = 0; i < buf_idx; i++) | 323 | for (i = 0; i < buf_idx; i++) |
327 | { | 324 | { |
@@ -357,7 +354,6 @@ static bool flush_buffer(void) | |||
357 | rb->close(fd); | 354 | rb->close(fd); |
358 | 355 | ||
359 | buf_idx = 0; | 356 | buf_idx = 0; |
360 | return true; | ||
361 | } | 357 | } |
362 | 358 | ||
363 | 359 | ||
@@ -395,7 +391,7 @@ void thread(void) | |||
395 | for this to occur because it requires > 16 hours of no disk activity. | 391 | for this to occur because it requires > 16 hours of no disk activity. |
396 | */ | 392 | */ |
397 | if (buf_idx == BUF_ELEMENTS) { | 393 | if (buf_idx == BUF_ELEMENTS) { |
398 | flush_buffer(); | 394 | flush_buffer(NULL); |
399 | } | 395 | } |
400 | 396 | ||
401 | /* sleep some time until next measurement */ | 397 | /* sleep some time until next measurement */ |