mobile: Fixed compiler warning at gsm322.c

This patch resolves the following issue:

In function 'memset',
    inlined from 'bargraph.constprop.14' at gsm322.c:325:8:
/usr/include/bits/string3.h:81:30: warning: call to '__warn_memset_zero_len' declared with attribute warning: memset used with constant zero length parameter; this could be due to transposed parameters [enabled by default]
This commit is contained in:
Andreas Eversberg 2014-01-29 09:24:18 +01:00
parent 134c95c817
commit 80813208e1
1 changed files with 2 additions and 1 deletions

View File

@ -322,7 +322,8 @@ static char *bargraph(int value, int min, int max)
else
value -= min;
memset(bar, '=', value);
if (value)
memset(bar, '=', value);
bar[value] = '\0';
return bar;