Always return a string from telephony_error_to_str.

So that it can be used as a printf argument directly.
This commit is contained in:
Andrzej Zaborowski 2009-10-12 22:39:47 +02:00 committed by Denis Kenzior
parent 5773e30373
commit 2d992d7912
1 changed files with 2 additions and 2 deletions

View File

@ -280,14 +280,14 @@ const char *telephony_error_to_str(const struct ofono_error *error)
maxentries = sizeof(ceer_errors) / sizeof(struct error_entry);
break;
default:
return 0;
return "Unknown error type";
}
for (i = 0; i < maxentries; i++)
if (e[i].error == error->error)
return e[i].str;
return 0;
return "Unknown error";
}
int mmi_service_code_to_bearer_class(int code)