[gnome-photos/wip/rishi/collection: 1/43] application: Let the compiler guess the size of the array



commit a5fcf15ad481b630276390e3925d809af9f383cb
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Jan 31 20:12:31 2018 +0100

    application: Let the compiler guess the size of the array
    
    This reduces the chances of making a mistake.

 src/photos-application.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index 8e7e4363..660fc10f 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -1773,12 +1773,12 @@ photos_application_selection_mode_notify_state (PhotosApplication *self)
 {
   if (photos_utils_get_selection_mode ())
     {
-      const gchar *selection_mode_accels[2] = {"Escape", NULL};
+      const gchar *selection_mode_accels[] = {"Escape", NULL};
       gtk_application_set_accels_for_action (GTK_APPLICATION (self), "app.selection-mode", 
selection_mode_accels);
     }
   else
     {
-      const gchar *selection_mode_accels[1] = {NULL};
+      const gchar *selection_mode_accels[] = {NULL};
       gtk_application_set_accels_for_action (GTK_APPLICATION (self), "app.selection-mode", 
selection_mode_accels);
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]