common: remove redundant predicate

If the first character is a plus sign, then it is not a nul, then
the string length is true anyway.
This commit is contained in:
Rémi Denis-Courmont 2010-11-23 14:40:38 +02:00 committed by Denis Kenzior
parent b79b64439f
commit e9d80e40ac
1 changed files with 1 additions and 1 deletions

View File

@ -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 {