If the first character is a plus sign, then it is not a nul, then
the string length is true anyway.
---
src/common.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/common.c b/src/common.c
index 22bf1c2..1088b5d 100644
--- a/src/common.c
+++ b/src/common.c
@@ -396,7 +396,7 @@ const char *phone_number_to_string(const struct
ofono_phone_number *ph)
void string_to_phone_number(const char *str, struct ofono_phone_number *ph)
{
- if (strlen(str) && str[0] == '+') {
+ if (str[0] == '+') {
strcpy(ph->number, str+1);
ph->type = 145; /* International */
} else {
--
1.7.1
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono