[kservice] use C89 format to avoid warning
This commit is contained in:
parent
1d0924c12a
commit
1e2bb8ea7a
@ -142,10 +142,12 @@ static struct _errno_str_t rt_errno_strs[] =
|
|||||||
*/
|
*/
|
||||||
const char *rt_strerror(rt_err_t error)
|
const char *rt_strerror(rt_err_t error)
|
||||||
{
|
{
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
error = -error;
|
error = -error;
|
||||||
|
|
||||||
for (int i = 0; i < sizeof(rt_errno_strs) / sizeof(rt_errno_strs[0]); i++)
|
for (i = 0; i < sizeof(rt_errno_strs) / sizeof(rt_errno_strs[0]); i++)
|
||||||
{
|
{
|
||||||
if (rt_errno_strs[i].error == error)
|
if (rt_errno_strs[i].error == error)
|
||||||
return rt_errno_strs[i].str;
|
return rt_errno_strs[i].str;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user