diff options
author | Stepan Moskovchenko <stevenm@rockbox.org> | 2006-05-03 05:18:18 +0000 |
---|---|---|
committer | Stepan Moskovchenko <stevenm@rockbox.org> | 2006-05-03 05:18:18 +0000 |
commit | 47efba8bbfd17cb6d95ce1039e0114dc24a9dc68 (patch) | |
tree | 4d42a46b6c0d66d7b53ec82dfc7a0ce826b5ba98 /apps/plugins/midi/midiutil.c | |
parent | 224b0bf1ffe3d5ec0f61dd2df20c13c48d1644b4 (diff) | |
download | rockbox-47efba8bbfd17cb6d95ce1039e0114dc24a9dc68.tar.gz rockbox-47efba8bbfd17cb6d95ce1039e0114dc24a9dc68.zip |
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
Diffstat (limited to 'apps/plugins/midi/midiutil.c')
-rw-r--r-- | apps/plugins/midi/midiutil.c | 12 |
1 files changed, 11 insertions, 1 deletions
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; |