summaryrefslogtreecommitdiffstats
path: root/firmware/debug.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-05-02 11:44:15 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-05-02 11:44:15 +0000
commit824a003052c51fdb9433bfd0dd0e4a525da8b2e7 (patch)
treeb3c8677982cd6bbf0336f7b1ca810cef0533d072 /firmware/debug.c
parenta98b20e22a63094cd590298f7f6f3c6c1a42fe83 (diff)
downloadrockbox-824a003052c51fdb9433bfd0dd0e4a525da8b2e7.tar.gz
rockbox-824a003052c51fdb9433bfd0dd0e4a525da8b2e7.tar.bz2
rockbox-824a003052c51fdb9433bfd0dd0e4a525da8b2e7.zip
Added Gary's snprintf() and changed all places to use it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@379 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/debug.c')
-rw-r--r--firmware/debug.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/debug.c b/firmware/debug.c
index d2186049aa..9d2a6997a0 100644
--- a/firmware/debug.c
+++ b/firmware/debug.c
@@ -29,7 +29,7 @@ char debugbuf[200];
static int debug_tx_ready(void)
{
- return (SSR1 & SCI_TDRE);
+ return (SSR1 & SCI_TDRE);
}
static void debug_tx_char(char ch)
@@ -180,7 +180,7 @@ void debugf(char *fmt, ...)
va_list ap;
va_start(ap, fmt);
- vsprintf(debugmembuf, fmt, ap);
+ vsnprintf(debugmembuf, sizeof(debugmembuf), fmt, ap);
va_end(ap);
debug(debugmembuf);
}
@@ -197,7 +197,7 @@ void debugf(char *fmt, ...)
va_list ap;
va_start( ap, fmt );
- vsprintf( debugmembuf, fmt, ap );
+ vsnprintf( debugmembuf, sizeof(debugmembuf), fmt, ap );
va_end( ap );
printf( debugmembuf );
}