diff options
author | Matthias Clasen <mclasen@redhat.com> | 2007-03-09 21:57:37 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2007-03-09 21:57:37 +0000 |
commit | 82ce59cd0fd65f4d3b13dc4c305fc6d8ec44a12c (patch) | |
tree | 59d060f22217bda52a711dbada1b7c771ddca617 /gtk/gtkfilesel.c | |
parent | a1e455446281f6a6a1a4eac14cd064cd9cfa93a7 (diff) | |
download | gtk+-82ce59cd0fd65f4d3b13dc4c305fc6d8ec44a12c.tar.gz |
Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,
2007-03-09 Matthias Clasen <mclasen@redhat.com>
* Everywhere: Remove unnecessary NULL checks before
g_free(). (#369666, Morten Welinder, Djihed Afifi)
* configure.in: Check for ftw.h
svn path=/trunk/; revision=17444
Diffstat (limited to 'gtk/gtkfilesel.c')
-rw-r--r-- | gtk/gtkfilesel.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c index 84090d1060..3bbd6d380f 100644 --- a/gtk/gtkfilesel.c +++ b/gtk/gtkfilesel.c @@ -2386,8 +2386,7 @@ gtk_file_selection_file_changed (GtkTreeSelection *selection, if (index != -1) { - if (fs->last_selected != NULL) - g_free (fs->last_selected); + g_free (fs->last_selected); fs->last_selected = g_strdup (g_ptr_array_index (new_names, index)); filename = get_real_filename (fs->last_selected, FALSE); @@ -2701,14 +2700,10 @@ cmpl_free_state (CompletionState* cmpl_state) cmpl_free_dir_list (cmpl_state->directory_storage); cmpl_free_dir_sent_list (cmpl_state->directory_sent_storage); - if (cmpl_state->user_dir_name_buffer) - g_free (cmpl_state->user_dir_name_buffer); - if (cmpl_state->user_directories) - g_free (cmpl_state->user_directories); - if (cmpl_state->the_completion.text) - g_free (cmpl_state->the_completion.text); - if (cmpl_state->updated_text) - g_free (cmpl_state->updated_text); + g_free (cmpl_state->user_dir_name_buffer); + g_free (cmpl_state->user_directories); + g_free (cmpl_state->the_completion.text); + g_free (cmpl_state->updated_text); g_free (cmpl_state); } @@ -3948,10 +3943,8 @@ get_pwdb (CompletionState* cmpl_state) error: - if (cmpl_state->user_dir_name_buffer) - g_free (cmpl_state->user_dir_name_buffer); - if (cmpl_state->user_directories) - g_free (cmpl_state->user_directories); + g_free (cmpl_state->user_dir_name_buffer); + g_free (cmpl_state->user_directories); cmpl_state->user_dir_name_buffer = NULL; cmpl_state->user_directories = NULL; |