[ghex] findreplace: delete pointless g_free NULL checks



commit f11c57742e622cea92dfd2448c1d34558343fa2b
Author: Logan Rathbone <poprocks gmail com>
Date:   Sun Dec 19 19:50:03 2021 -0500

    findreplace: delete pointless g_free NULL checks

 src/findreplace.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/src/findreplace.c b/src/findreplace.c
index a89c484..d0996ee 100644
--- a/src/findreplace.c
+++ b/src/findreplace.c
@@ -454,11 +454,8 @@ replace_one_cb (GtkButton *button, gpointer user_data)
        }
 
 clean_up:
-       if (find_str)
-               g_free(find_str);
-
-       if(rep_str)
-               g_free(rep_str);
+       g_free(find_str);
+       g_free(rep_str);
 }
 
 static void
@@ -521,11 +518,8 @@ replace_all_cb (GtkButton *button, gpointer user_data)
        }
        
 clean_up:
-       if (find_str)
-               g_free(find_str);
-
-       if (rep_str)
-               g_free(rep_str);
+       g_free(find_str);
+       g_free(rep_str);
 }
 
 static void


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