[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: Sat, 2 Apr 2011 21:23:31 +0000 (UTC)
commit d32c164769b832a02287d66fdbd32f3c066a59af
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Sat Apr 2 23:18:24 2011 +0200
noop: code cleanup
src/gnome-cmd-search-dialog.cc | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/gnome-cmd-search-dialog.cc b/src/gnome-cmd-search-dialog.cc
index c408297..03d5eb4 100755
--- a/src/gnome-cmd-search-dialog.cc
+++ b/src/gnome-cmd-search-dialog.cc
@@ -138,7 +138,7 @@ inline void set_statusmsg (SearchData *data, gchar *msg)
inline void search_file_data_free (SearchFileData *searchfile_data)
{
- if (searchfile_data->handle != NULL)
+ if (searchfile_data->handle)
gnome_vfs_close (searchfile_data->handle);
g_free (searchfile_data->uri_str);
@@ -227,14 +227,14 @@ static SearchFileData *read_search_file (SearchData *data, SearchFileData *searc
*/
inline gboolean content_matches (GnomeCmdFile *f, SearchData *data)
{
- gint ret = REG_NOMATCH;
+ gint ret = REG_NOMATCH;
if (f->info->size > 0)
{
regmatch_t match;
SearchFileData *search_file = NULL;
- while ((search_file = read_search_file (data, search_file, f)) != NULL)
+ while ((search_file = read_search_file (data, search_file, f)))
{
ret = regexec (data->content_regex, data->search_mem, 1, &match, 0);
// stop on first match
@@ -278,7 +278,6 @@ static void search_dir_r (GnomeCmdDir *dir, SearchData *data)
g_mutex_unlock (data->pdata.mutex);
}
-
// If the stop button was pressed let's abort here
if (data->stopped)
return;
@@ -726,8 +725,8 @@ inline GtkWidget *create_label_with_mnemonic (GtkWidget *parent, const gchar *te
{
GtkWidget *label = gtk_label_new_with_mnemonic (text);
- if (for_widget != NULL)
- gtk_label_set_mnemonic_widget (GTK_LABEL (label), for_widget);
+ if (for_widget)
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label), for_widget);
g_object_ref (label);
g_object_set_data_full (G_OBJECT (parent), "label", label, g_object_unref);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]