1
0
Fork 0
forked from len0rd/rockbox

PDBox: Use correct values of maximal string size for snprintf.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22154 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Wincent Balin 2009-08-04 13:52:43 +00:00
parent 28fbb49c0b
commit 7996e77334
10 changed files with 25 additions and 28 deletions

View file

@ -94,8 +94,8 @@ static void glist_doupdatewindowlist(t_glist *gl, char *sbuf)
{
char tbuf[1024];
#ifdef ROCKBOX
snprintf(tbuf, sizeof(tbuf)-1,
"{%s .x%x} ", gl->gl_name->s_name, (t_int)canvas);
snprintf(tbuf, sizeof(tbuf),
"{%s .x%x} ", gl->gl_name->s_name, (t_int) canvas);
#else /* ROCKBOX */
sprintf(tbuf, "{%s .x%x} ", gl->gl_name->s_name, (t_int)canvas);
#endif /* ROCKBOX */
@ -483,7 +483,7 @@ t_glist *glist_addglist(t_glist *g, t_symbol *sym,
{
char buf[40];
#ifdef ROCKBOX
snprintf(buf, sizeof(buf)-1, "graph%d", ++gcount);
snprintf(buf, sizeof(buf), "graph%d", ++gcount);
#else /* ROCKBOX */
sprintf(buf, "graph%d", ++gcount);
#endif /* ROCKBOX */
@ -712,7 +712,7 @@ static t_editor *editor_new(t_glist *owner)
x->e_deleted = binbuf_new();
x->e_glist = owner;
#ifdef ROCKBOX
snprintf(buf, sizeof(buf)-1, ".x%x", (t_int)owner);
snprintf(buf, sizeof(buf), ".x%x", (t_int)owner);
#else /* ROCKBOX */
sprintf(buf, ".x%x", (t_int)owner);
#endif /* ROCKBOX */
@ -1237,7 +1237,7 @@ static void *table_new(t_symbol *s, t_floatarg f)
char tabname[255];
t_symbol *t = gensym("table");
#ifdef ROCKBOX
snprintf(tabname, sizeof(tabname)-1, "%s%d", t->s_name, tabcount++);
snprintf(tabname, sizeof(tabname), "%s%d", t->s_name, tabcount++);
#else /* ROCKBOX */
sprintf(tabname, "%s%d", t->s_name, tabcount++);
#endif /* ROCKBOX */