summaryrefslogtreecommitdiffstats
path: root/src/common.c
diff options
context:
space:
mode:
authorAndrzej Zaborowski <andrew.zaborowski@intel.com>2009-10-12 22:39:47 +0200
committerDenis Kenzior <denkenz@gmail.com>2009-10-16 11:14:02 -0500
commit2d992d791240afb78032d8eed2331eb1de6bc7f2 (patch)
tree333c14fde7cfb6b92c83677d8c3687b3e14848af /src/common.c
parent5773e303733940b57a211971ff0b6aa817d4dd12 (diff)
downloadofono-2d992d791240afb78032d8eed2331eb1de6bc7f2.tar.bz2
Always return a string from telephony_error_to_str.
So that it can be used as a printf argument directly.
Diffstat (limited to 'src/common.c')
-rw-r--r--src/common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common.c b/src/common.c
index 1b002bf9..cb793347 100644
--- a/src/common.c
+++ b/src/common.c
@@ -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)