From 58166e645971a4812fef23702f45cacc8e64e419 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 24 Oct 2009 17:55:54 -0400 Subject: Prefer G_N_ELEMENTS over sizeof calculations. --- widgets/misc/test-calendar.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'widgets/misc') diff --git a/widgets/misc/test-calendar.c b/widgets/misc/test-calendar.c index 458d60f90a..83b8f11cd7 100644 --- a/widgets/misc/test-calendar.c +++ b/widgets/misc/test-calendar.c @@ -41,8 +41,6 @@ static GtkTargetEntry target_table[] = { { (gchar *) "E-SHORTCUT", 0, TARGET_SHORTCUT } }; -static guint n_targets = sizeof(target_table) / sizeof(target_table[0]); - static void on_date_range_changed (ECalendarItem *calitem); static void on_selection_changed (ECalendarItem *calitem); @@ -85,7 +83,7 @@ main (gint argc, gchar **argv) gtk_drag_dest_set (cal, GTK_DEST_DEFAULT_ALL, - target_table, n_targets, + target_table, G_N_ELEMENTS (target_table), GDK_ACTION_COPY | GDK_ACTION_MOVE); vbox = gtk_vbox_new (FALSE, 0); -- cgit v1.2.3