talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 579f91dc8bd600e9197a747dc152ab1383601a94
parent 147fa58416dd5a07a81c3d5e9d4ff4e48dd5f34c
Author: wwp <wwp@free.fr>
Date:   Wed,  8 Feb 2017 23:33:38 +0100

Fix wrong return value type.

Diffstat:
Msrc/common/utils.c | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/common/utils.c b/src/common/utils.c @@ -1089,13 +1089,13 @@ static const gchar * line_has_quote_char_last(const gchar * str, const gchar *qu gchar * tmp_pos = NULL; int i; - if (quote_chars == NULL) + if (str == NULL || quote_chars == NULL) return NULL; for (i = 0; i < strlen(quote_chars); i++) { - tmp_pos = strrchr (str, quote_chars[i]); + tmp_pos = strrchr (str, quote_chars[i]); if(position == NULL - || (tmp_pos != NULL && position <= tmp_pos) ) + || (tmp_pos != NULL && position <= tmp_pos) ) position = tmp_pos; } return position; @@ -1178,13 +1178,13 @@ const gchar * line_has_quote_char(const gchar * str, const gchar *quote_chars) gchar * tmp_pos = NULL; int i; - if (quote_chars == NULL) - return FALSE; + if (str == NULL || quote_chars == NULL) + return NULL; for (i = 0; i < strlen(quote_chars); i++) { - tmp_pos = strchr (str, quote_chars[i]); + tmp_pos = strchr (str, quote_chars[i]); if(position == NULL - || (tmp_pos != NULL && position >= tmp_pos) ) + || (tmp_pos != NULL && position >= tmp_pos) ) position = tmp_pos; } return position;