[easytag] Use et_str_empty() instead of strlen() in search
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Use et_str_empty() instead of strlen() in search
- Date: Fri, 27 Mar 2015 17:09:00 +0000 (UTC)
commit 2e77643a70ef2f9a9bce83867c963aac1b54c65e
Author: David King <amigadave amigadave com>
Date: Fri Mar 27 18:08:03 2015 +0100
Use et_str_empty() instead of strlen() in search
src/search_dialog.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/search_dialog.c b/src/search_dialog.c
index 0c551ad..f0af0b4 100644
--- a/src/search_dialog.c
+++ b/src/search_dialog.c
@@ -256,7 +256,9 @@ Add_Row_To_Search_Result_List (EtSearchDialog *self,
{
if (case_sensitive)
{
- if ( SearchResultList_Text[column] && strlen(string_to_search) &&
strstr(SearchResultList_Text[column],string_to_search) )
+ if (SearchResultList_Text[column]
+ && !et_str_empty (string_to_search)
+ && strstr (SearchResultList_Text[column], string_to_search))
{
if (g_settings_get_boolean (MainSettings, "file-changed-bold"))
{
@@ -282,7 +284,8 @@ Add_Row_To_Search_Result_List (EtSearchDialog *self,
list_text = g_utf8_casefold(SearchResultList_Text[column], -1);
- if ( list_text && strlen(string_to_search2) && strstr(list_text,string_to_search2) )
+ if (list_text && !et_str_empty (string_to_search2)
+ && strstr (list_text, string_to_search2))
{
if (g_settings_get_boolean (MainSettings, "file-changed-bold"))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]