From d6028c82867eb92ccd1a3a7f1473316cbe462271 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 7 Sep 2010 21:51:03 -0700 Subject: [PATCH] gui: Prefer NULL to 0 for initializing pointers. Using NULL instead of 0 is better modern C style. --- src/ui/gui/helper.c | 2 +- src/ui/gui/val-labs-dialog.c | 8 ++++---- src/ui/gui/var-display.c | 2 +- src/ui/gui/variable-info-dialog.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ui/gui/helper.c b/src/ui/gui/helper.c index 36165c7c..75954fbd 100644 --- a/src/ui/gui/helper.c +++ b/src/ui/gui/helper.c @@ -52,7 +52,7 @@ gchar * value_to_text (union value v, const PsppireDict *dict, struct fmt_spec format) { - gchar *s = 0; + gchar *s = NULL; s = data_out (&v, dict_get_encoding (dict->dict), &format); g_strchug (s); diff --git a/src/ui/gui/val-labs-dialog.c b/src/ui/gui/val-labs-dialog.c index 605be36f..950a59e6 100644 --- a/src/ui/gui/val-labs-dialog.c +++ b/src/ui/gui/val-labs-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2005, 2009, 2011 Free Software Foundation + Copyright (C) 2005, 2009, 2010, 2011 Free Software Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -192,7 +192,7 @@ val_labs_ok (GtkWidget *w, gpointer data) val_labs_destroy (dialog->labs); - dialog->labs = 0; + dialog->labs = NULL; gtk_widget_hide (dialog->window); @@ -206,7 +206,7 @@ val_labs_cancel (struct val_labs_dialog *dialog) { val_labs_destroy (dialog->labs); - dialog->labs = 0; + dialog->labs = NULL; gtk_widget_hide (dialog->window); } @@ -461,7 +461,7 @@ val_labs_dialog_create (GtkWindow *toplevel, PsppireVarStore *var_store) g_signal_connect (dialog->add_button, "clicked", G_CALLBACK (on_add), dialog); - dialog->labs = 0; + dialog->labs = NULL; g_object_unref (xml); diff --git a/src/ui/gui/var-display.c b/src/ui/gui/var-display.c index 26de981f..5f85af2e 100644 --- a/src/ui/gui/var-display.c +++ b/src/ui/gui/var-display.c @@ -69,7 +69,7 @@ missing_values_to_string (const PsppireDict *dict, const struct variable *pv, GE if ( mv_has_value (miss)) { - gchar *ss = 0; + gchar *ss = NULL; ss = value_to_text (*mv_get_value (miss, 0), dict, *fmt); diff --git a/src/ui/gui/variable-info-dialog.c b/src/ui/gui/variable-info-dialog.c index 37f501a4..3692a0d2 100644 --- a/src/ui/gui/variable-info-dialog.c +++ b/src/ui/gui/variable-info-dialog.c @@ -55,7 +55,7 @@ label_to_string (const struct variable *var) static void populate_text (PsppireDictView *treeview, gpointer data) { - gchar *text = 0; + gchar *text = NULL; GString *gstring; PsppireDict *dict; -- 2.30.2