summaryrefslogtreecommitdiff
path: root/firmware/id3.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/id3.c
parenta98b20e22a63094cd590298f7f6f3c6c1a42fe83 (diff)
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/id3.c')
-rw-r--r--firmware/id3.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/firmware/id3.c b/firmware/id3.c
index b510195cb1..5761380e60 100644
--- a/firmware/id3.c
+++ b/firmware/id3.c
@@ -27,10 +27,7 @@
#include <unistd.h>
#include <string.h>
#include <errno.h>
-
-#ifdef SIMULATOR
#include <fcntl.h>
-#endif
struct mp3entry {
char *path;
@@ -530,7 +527,7 @@ char *secs2str(int ms)
static char buffer[32];
int secs = ms/1000;
ms %= 1000;
- sprintf(buffer, "%d:%02d.%d", secs/60, secs%60, ms/100);
+ snprintf(buffer, sizeof(buffer), "%d:%02d.%d", secs/60, secs%60, ms/100);
return buffer;
}