aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/msn/msn.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-08-07 17:33:02 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-08-07 17:33:02 +0100
commitdaae10fbfe16bac26f74af91faf253d377f1b166 (patch)
treee7870e81be568ab10abcc1bf8639a9191dbbb9c1 /protocols/msn/msn.c
parent289bd2d47ff58f42879ad50ebbc1b193831e4a78 (diff)
OpenSolaris (non-gcc) fixes, patches from Dagobert Michelsen <dam@opencsw.org>
with some changes.
Diffstat (limited to 'protocols/msn/msn.c')
-rw-r--r--protocols/msn/msn.c7
1 files changed, 3 insertions, 4 deletions
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 ) );