[gnome-commander] noop: code cleanup
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] noop: code cleanup
- Date: Mon, 28 Mar 2011 17:22:04 +0000 (UTC)
commit 5417714a0693991432e6efee47759bf21126acdf
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Mon Mar 28 19:18:28 2011 +0200
noop: code cleanup
src/gnome-cmd-search-dialog.cc | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/gnome-cmd-search-dialog.cc b/src/gnome-cmd-search-dialog.cc
index c66199f..8068063 100644
--- a/src/gnome-cmd-search-dialog.cc
+++ b/src/gnome-cmd-search-dialog.cc
@@ -153,7 +153,7 @@ static SearchFileData *read_search_file (SearchData *data, SearchFileData *searc
GnomeVFSResult result;
- if (searchfile_data == NULL)
+ if (!searchfile_data)
{
searchfile_data = g_new0 (SearchFileData, 1);
searchfile_data->uri_str = f->get_uri_str();
@@ -544,8 +544,8 @@ static gboolean start_generic_search (GnomeCmdSearchDialog *dialog)
regcomp (data->content_regex, data->content_pattern, data->case_sens ? 0 : REG_ICASE);
}
- if (dialog->priv->data->search_mem == NULL)
- dialog->priv->data->search_mem = (gchar *) g_malloc (SEARCH_BUFFER_SIZE);
+ if (!data->search_mem)
+ data->search_mem = (gchar *) g_malloc (SEARCH_BUFFER_SIZE);
// start the search
GnomeCmdPath *path = gnome_cmd_con_create_path (dialog->priv->con, data->dir);
@@ -554,15 +554,14 @@ static gboolean start_generic_search (GnomeCmdSearchDialog *dialog)
data->search_done = FALSE;
- if (data->pdata.mutex == NULL)
- data->pdata.mutex = g_mutex_new ();
+ if (!data->pdata.mutex)
+ data->pdata.mutex = g_mutex_new ();
data->thread = g_thread_create ((GThreadFunc) perform_search_operation, data, TRUE, NULL);
gtk_widget_show (data->dialog->priv->pbar);
- data->update_gui_timeout_id = g_timeout_add (gnome_cmd_data.gui_update_rate,
- (GSourceFunc) update_search_status_widgets,
- dialog->priv->data);
+ data->update_gui_timeout_id = g_timeout_add (gnome_cmd_data.gui_update_rate, (GSourceFunc) update_search_status_widgets, data);
+
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]