summaryrefslogtreecommitdiffstats
path: root/firmware/debug.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2004-08-16 23:37:23 +0000
committerJens Arnold <amiconn@rockbox.org>2004-08-16 23:37:23 +0000
commitc76c568b351d37c485f78cd185b2d52d54fe7a34 (patch)
treeca65a23113fb82941855e44b5dcc3a0896885882 /firmware/debug.c
parent8b131ac1fb04cb96094044dca7423a8d1da7f690 (diff)
downloadrockbox-c76c568b351d37c485f78cd185b2d52d54fe7a34.tar.gz
rockbox-c76c568b351d37c485f78cd185b2d52d54fe7a34.tar.bz2
rockbox-c76c568b351d37c485f78cd185b2d52d54fe7a34.zip
Const policed pointer arguments to functions, part 1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4995 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/debug.c')
-rw-r--r--firmware/debug.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/firmware/debug.c b/firmware/debug.c
index 977ece3f5d..6a30c6076a 100644
--- a/firmware/debug.c
+++ b/firmware/debug.c
@@ -112,11 +112,11 @@ static char lowhex(int x)
return hexchars[x & 0xf];
}
-static void putpacket (char *buffer)
+static void putpacket (const char *buffer)
{
register int checksum;
- char *src = buffer;
+ const char *src = buffer;
/* Special debug hack. Shut off the Rx IRQ during I/O to prevent the debug
stub from interrupting the message */
@@ -172,7 +172,7 @@ static void putpacket (char *buffer)
/* convert the memory, pointed to by mem into hex, placing result in buf */
/* return a pointer to the last char put in buf (null) */
-static char *mem2hex (char *mem, char *buf, int count)
+static char *mem2hex (const char *mem, char *buf, int count)
{
int i;
int ch;
@@ -186,7 +186,7 @@ static char *mem2hex (char *mem, char *buf, int count)
return (buf);
}
-static void debug(char *msg)
+static void debug(const char *msg)
{
debugbuf[0] = 'O';
@@ -196,7 +196,7 @@ static void debug(char *msg)
#endif /* end of DEBUG section */
#ifdef __GNUC__
-void debugf(char *fmt, ...)
+void debugf(const char *fmt, ...)
#endif
{
#ifdef DEBUG
@@ -218,7 +218,7 @@ void debug_init(void)
{
}
-void debugf(char *fmt, ...)
+void debugf(const char *fmt, ...)
{
va_list ap;
va_start( ap, fmt );
@@ -226,7 +226,7 @@ void debugf(char *fmt, ...)
va_end( ap );
}
-void ldebugf(char* file, int line, char *fmt, ...)
+void ldebugf(const char* file, int line, const char *fmt, ...)
{
va_list ap;
va_start( ap, fmt );