* [PATCH] string_to_phone_number: remove redumdant predicate
@ 2010-11-23 12:40 =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2010-11-23 12:49 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont @ 2010-11-23 12:40 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 636 bytes --]
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
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] string_to_phone_number: remove redumdant predicate
2010-11-23 12:40 [PATCH] string_to_phone_number: remove redumdant predicate =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
@ 2010-11-23 12:49 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2010-11-23 12:49 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 318 bytes --]
Hi Rémi,
On 11/23/2010 06:40 AM, Rémi Denis-Courmont wrote:
> 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(-)
>
Patch has been applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-23 12:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-23 12:40 [PATCH] string_to_phone_number: remove redumdant predicate =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2010-11-23 12:49 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.