summaryrefslogtreecommitdiffstats
path: root/src/common.c
diff options
context:
space:
mode:
authorRĂ©mi Denis-Courmont <remi.denis-courmont@nokia.com>2010-11-23 14:40:38 +0200
committerDenis Kenzior <denkenz@gmail.com>2010-11-23 06:48:57 -0600
commite9d80e40acf0e35facc67106932994358c49ad5a (patch)
tree0270bcb808a69deb83cf25e0c89b8be80e15461c /src/common.c
parentb79b64439f432098cc60194c01d911784d37b1c1 (diff)
downloadofono-e9d80e40acf0e35facc67106932994358c49ad5a.tar.bz2
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.
Diffstat (limited to 'src/common.c')
-rw-r--r--src/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common.c b/src/common.c
index b5b9a6f2..f32153cb 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 {