From: John Darrington Date: Tue, 28 Jul 2009 05:05:42 +0000 (+0200) Subject: Replace safe_strcmp with g_strcmp0. X-Git-Tag: build37~23 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=524932d8d25d51ca1d0c6993ec9f36014073b3d9;p=pspp-builds.git Replace safe_strcmp with g_strcmp0. --- diff --git a/lib/gtk-contrib/psppire-sheet.c b/lib/gtk-contrib/psppire-sheet.c index dc0f4080..8122eba9 100644 --- a/lib/gtk-contrib/psppire-sheet.c +++ b/lib/gtk-contrib/psppire-sheet.c @@ -54,8 +54,6 @@ #include #include -#include -#include #include #include #include @@ -72,8 +70,6 @@ #include #include -#include - /* sheet flags */ enum { @@ -2257,17 +2253,6 @@ draw_sheet_region (PsppireSheet *sheet, GdkRegion *region) psppire_sheet_show_entry_widget (sheet); } - - -static inline gint -safe_strcmp (const gchar *s1, const gchar *s2) -{ - if ( !s1 && !s2) return 0; - if ( !s1) return -1; - if ( !s2) return +1; - return strcmp (s1, s2); -} - static void psppire_sheet_set_cell (PsppireSheet *sheet, gint row, gint col, GtkJustification justification, @@ -2289,7 +2274,7 @@ psppire_sheet_set_cell (PsppireSheet *sheet, gint row, gint col, old_text = psppire_sheet_model_get_string (model, row, col); - if (0 != safe_strcmp (old_text, text)) + if (0 != g_strcmp0 (old_text, text)) { g_signal_handler_block (sheet->model, sheet->update_handler_id); psppire_sheet_model_set_string (model, text, row, col);