@ -174,7 +174,7 @@ void invoke_swaybar(struct bar_config *bar) {
if ( ! command ) {
if ( ! command ) {
const char msg [ ] = " Unable to allocate swaybar command string " ;
const char msg [ ] = " Unable to allocate swaybar command string " ;
size_t msg_len = sizeof ( msg ) ;
size_t msg_len = sizeof ( msg ) ;
if ( write ( filedes [ 1 ] , & msg_len , sizeof ( in t) ) ) { } ;
if ( write ( filedes [ 1 ] , & msg_len , sizeof ( size_ t) ) ) { } ;
if ( write ( filedes [ 1 ] , msg , msg_len ) ) { } ;
if ( write ( filedes [ 1 ] , msg , msg_len ) ) { } ;
close ( filedes [ 1 ] ) ;
close ( filedes [ 1 ] ) ;
exit ( 1 ) ;
exit ( 1 ) ;
@ -189,8 +189,8 @@ void invoke_swaybar(struct bar_config *bar) {
}
}
wlr_log ( L_DEBUG , " Spawned swaybar %d " , bar - > pid ) ;
wlr_log ( L_DEBUG , " Spawned swaybar %d " , bar - > pid ) ;
close ( filedes [ 0 ] ) ;
close ( filedes [ 0 ] ) ;
s s ize_t len ;
s ize_t len ;
if ( read ( filedes [ 1 ] , & len , sizeof ( int) ) = = sizeof ( in t) ) {
if ( read ( filedes [ 1 ] , & len , sizeof ( size_t) ) = = sizeof ( size_ t) ) {
char * buf = malloc ( len ) ;
char * buf = malloc ( len ) ;
if ( ! buf ) {
if ( ! buf ) {
wlr_log ( L_ERROR , " Cannot allocate error string " ) ;
wlr_log ( L_ERROR , " Cannot allocate error string " ) ;