From f90f812f2beff826a41521384c3687fbf341e95b Mon Sep 17 00:00:00 2001 From: mjentsch Date: Fri, 16 Jan 2015 12:39:04 +0100 Subject: [PATCH] Fix compiler warnings --- telegram-purple.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/telegram-purple.c b/telegram-purple.c index 0384ce8..e53a164 100755 --- a/telegram-purple.c +++ b/telegram-purple.c @@ -1111,7 +1111,7 @@ static char *strdup_replace (char *str, const char *replace, char *with) { return joined; } -static char *tgprpl_normalize_phone_number (const PurpleAccount *account, const char *phone) { +static const char *tgprpl_normalize_phone_number (const PurpleAccount *account, const char *phone) { // remove all special characters char *a = g_strdup(phone); @@ -1136,6 +1136,7 @@ static char *tgprpl_normalize_phone_number (const PurpleAccount *account, const regex_t exp; if (regcomp (&exp, "\\+[0-9]+$", REG_EXTENDED) != 0) { warning ("Regex invalid"); + return NULL; } if (regexec (&exp, normalized, 0, 0, 0) != 0) { return NULL;