[easytag] Use g_str_empty() for more empty string checks
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Use g_str_empty() for more empty string checks
- Date: Wed, 25 Mar 2015 18:44:58 +0000 (UTC)
commit b32f9f1370bf03ffe78c476d8d78cb2092e395a0
Author: David King <amigadave amigadave com>
Date: Wed Mar 25 19:42:40 2015 +0100
Use g_str_empty() for more empty string checks
src/browser.c | 3 ++-
src/tag_area.c | 2 +-
src/tags/flac_tag.c | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/browser.c b/src/browser.c
index fa0809a..b45c82d 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -4155,7 +4155,8 @@ et_browser_show_rename_directory_dialog (EtBrowser *self)
/* We get the full path but we musn't display the parent directories */
directory_parent = g_strdup(priv->current_path);
- if (!directory_parent || strlen(directory_parent) == 0)
+
+ if (et_str_empty (directory_parent))
{
g_free(directory_parent);
return;
diff --git a/src/tag_area.c b/src/tag_area.c
index e249663..36eb1a0 100644
--- a/src/tag_area.c
+++ b/src/tag_area.c
@@ -1164,7 +1164,7 @@ Parse_Date (EtTagArea *self)
/* Get the info entered by user */
year = gtk_entry_get_text (GTK_ENTRY (priv->year_entry));
- if (strcmp (year,"") != 0 && strlen (year) < 4)
+ if (!et_str_empty (year) && strlen (year) < 4)
{
GDateTime *dt;
gchar *tmp, *tmp1;
diff --git a/src/tags/flac_tag.c b/src/tags/flac_tag.c
index f2f4f01..dd98374 100644
--- a/src/tags/flac_tag.c
+++ b/src/tags/flac_tag.c
@@ -753,7 +753,7 @@ static gboolean Flac_Write_Delimetered_Tag (FLAC__StreamMetadata *vc_block, cons
for (i=0;i<g_strv_length(strings);i++)
{
- if (strlen(strings[i])>0)
+ if (!et_str_empty (strings[i]))
{
Flac_Write_Tag(vc_block, tag_name, strings[i]);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]