From 2d992d791240afb78032d8eed2331eb1de6bc7f2 Mon Sep 17 00:00:00 2001 From: Andrzej Zaborowski Date: Mon, 12 Oct 2009 22:39:47 +0200 Subject: Always return a string from telephony_error_to_str. So that it can be used as a printf argument directly. --- src/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common.c') 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) -- cgit v1.2.3