[easytag/wip/win32: 4/6] Avoid an unnecessary NULL check



commit 7ff5a6e4084a46d69a2290889957ea3917cf9c3e
Author: David King <amigadave amigadave com>
Date:   Fri Jan 22 16:02:51 2016 +0000

    Avoid an unnecessary NULL check
    
    Found with Coverity (CID 1295129).

 src/scan_dialog.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/scan_dialog.c b/src/scan_dialog.c
index 4fcf472..9ecfe7c 100644
--- a/src/scan_dialog.c
+++ b/src/scan_dialog.c
@@ -2653,7 +2653,7 @@ entry_check_rename_file_mask (GtkEntry *entry, gpointer user_data)
     ||   strstr(mask,"data/") != NULL)
         goto Bad_Mask;
 
-    while (mask)
+    do
     {
         if ( (tmp=strrchr(mask,'%'))==NULL )
         {
@@ -2673,7 +2673,7 @@ entry_check_rename_file_mask (GtkEntry *entry, gpointer user_data)
         {
             goto Bad_Mask;
         }
-    }
+    } while (mask);
 
     Bad_Mask:
         g_free(mask);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]