From daae10fbfe16bac26f74af91faf253d377f1b166 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 7 Aug 2010 17:33:02 +0100 Subject: OpenSolaris (non-gcc) fixes, patches from Dagobert Michelsen with some changes. --- protocols/msn/msn.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'protocols/msn/msn.c') diff --git a/protocols/msn/msn.c b/protocols/msn/msn.c index de8271e8..60d58532 100644 --- a/protocols/msn/msn.c +++ b/protocols/msn/msn.c @@ -175,11 +175,10 @@ static void msn_set_away( struct im_connection *ic, char *state, char *message ) char buf[1024]; struct msn_data *md = ic->proto_data; - if( state ) - md->away_state = msn_away_state_by_name( state ) ? : - msn_away_state_list + 1; - else + if( state == NULL ) md->away_state = msn_away_state_list; + else if( ( md->away_state = msn_away_state_by_name( state ) ) == NULL ) + md->away_state = msn_away_state_list + 1; g_snprintf( buf, sizeof( buf ), "CHG %d %s\r\n", ++md->trId, md->away_state->code ); msn_write( ic, buf, strlen( buf ) ); -- cgit v1.2.3