@@ -94,7 +94,7 @@ ewmh_update_net_active_window(lua_State *L)
9494static int
9595ewmh_update_net_client_list (lua_State * L )
9696{
97- xcb_window_t * wins = p_alloca ( xcb_window_t , globalconf .clients .len ) ;
97+ xcb_window_t wins [ globalconf .clients .len ] ;
9898
9999 int n = 0 ;
100100 foreach (client , globalconf .clients )
@@ -215,16 +215,16 @@ ewmh_update_maximize(bool h, bool status, bool toggle)
215215 lua_State * L = globalconf_get_lua_State ();
216216
217217 if (h )
218- lua_pushstring (L , "client_maximize_horizontal" );
218+ lua_pushliteral (L , "client_maximize_horizontal" );
219219 else
220- lua_pushstring (L , "client_maximize_vertical" );
220+ lua_pushliteral (L , "client_maximize_vertical" );
221221
222222 /* Create table argument with raise=true. */
223223 lua_newtable (L );
224- lua_pushstring (L , "toggle" );
224+ lua_pushliteral (L , "toggle" );
225225 lua_pushboolean (L , toggle );
226226 lua_settable (L , -3 );
227- lua_pushstring (L , "status" );
227+ lua_pushliteral (L , "status" );
228228 lua_pushboolean (L , status );
229229 lua_settable (L , -3 );
230230
271271ewmh_update_net_client_list_stacking (void )
272272{
273273 int n = 0 ;
274- xcb_window_t * wins = p_alloca ( xcb_window_t , globalconf .stack .len ) ;
274+ xcb_window_t wins [ globalconf .stack .len ] ;
275275
276276 foreach (client , globalconf .stack )
277277 wins [n ++ ] = (* client )-> window ;
@@ -467,7 +467,7 @@ ewmh_process_client_message(xcb_client_message_event_t *ev)
467467 {
468468 lua_State * L = globalconf_get_lua_State ();
469469 luaA_object_push (L , globalconf .tags .tab [idx ]);
470- lua_pushstring (L , "ewmh" );
470+ lua_pushliteral (L , "ewmh" );
471471 luaA_object_emit_signal (L , -2 , "request::select" , 1 );
472472 lua_pop (L , 1 );
473473 }
@@ -499,11 +499,11 @@ ewmh_process_client_message(xcb_client_message_event_t *ev)
499499 if ((c = client_getbywin (ev -> window ))) {
500500 lua_State * L = globalconf_get_lua_State ();
501501 luaA_object_push (L , c );
502- lua_pushstring (L , "ewmh" );
502+ lua_pushliteral (L , "ewmh" );
503503
504504 /* Create table argument with raise=true. */
505505 lua_newtable (L );
506- lua_pushstring (L , "raise" );
506+ lua_pushliteral (L , "raise" );
507507 lua_pushboolean (L , true);
508508 lua_settable (L , -3 );
509509
@@ -768,10 +768,9 @@ static cairo_surface_array_t
768768ewmh_window_icon_from_reply (xcb_get_property_reply_t * r )
769769{
770770 uint32_t * data , * data_end ;
771- cairo_surface_array_t result ;
771+ cairo_surface_array_t result = {} ;
772772 cairo_surface_t * s ;
773773
774- cairo_surface_array_init (& result );
775774 if (!r || r -> type != XCB_ATOM_CARDINAL || r -> format != 32 )
776775 return result ;
777776
0 commit comments