From 47efba8bbfd17cb6d95ce1039e0114dc24a9dc68 Mon Sep 17 00:00:00 2001 From: Stepan Moskovchenko Date: Wed, 3 May 2006 05:18:18 +0000 Subject: Fix file descriptor leak that would cause a hard lockup every 7 files played. A few other cosmetic changes. please, please no red build =) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9865 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/midi/midiutil.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'apps/plugins/midi/midiutil.c') diff --git a/apps/plugins/midi/midiutil.c b/apps/plugins/midi/midiutil.c index 8e27e739e7..daadae8a4f 100644 --- a/apps/plugins/midi/midiutil.c +++ b/apps/plugins/midi/midiutil.c @@ -62,6 +62,7 @@ extern struct plugin_api * rb; +int printf(const char *fmt, ...); int chVol[16] IBSS_ATTR; /* Channel volume */ int chPanLeft[16] IBSS_ATTR; /* Channel panning */ @@ -156,6 +157,15 @@ void *alloc(int size) if (size + 4 > totalSize) { + printf("\nMALLOC BARF"); + printf("\nMALLOC BARF"); + printf("\nMALLOC BARF"); + printf("\nMALLOC BARF"); + printf("\nMALLOC BARF"); + printf("\nMALLOC BARF"); + printf("\nMALLOC BARF"); + /* We've made our point. */ + return NULL; } @@ -229,7 +239,7 @@ int eof(int fd) // Here is a hacked up printf command to get the output from the game. int printf(const char *fmt, ...) { - static int p_xtpt; + static int p_xtpt = 0; char p_buf[50]; bool ok; va_list ap; -- cgit v1.2.3