From 2a5a764ca0f650bb188a2da43d69cb4db6855337 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sat, 24 Sep 2011 15:35:56 +0200 Subject: Do not assign and check in if --- src/cmumble.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cmumble.c b/src/cmumble.c index 82af149..f7b7214 100644 --- a/src/cmumble.c +++ b/src/cmumble.c @@ -124,13 +124,13 @@ recv_codec_version(MumbleProto__CodecVersion *codec, struct cmumble_context *ctx codec->alpha, codec->beta, codec->prefer_alpha); } - static void recv_user_remove(MumbleProto__UserRemove *remove, struct cmumble_context *ctx) { struct cmumble_user *user = NULL; - if ((user = find_user(ctx, remove->session))) { + user = find_user(ctx, remove->session); + if (user) { ctx->users = g_list_remove(ctx->users, user); g_free(user->name); /* FIXME: destroy playback pipeline */ @@ -143,7 +143,8 @@ recv_user_state(MumbleProto__UserState *state, struct cmumble_context *ctx) { struct cmumble_user *user = NULL; - if ((user = find_user(ctx, state->session))) { + user = find_user(ctx, state->session); + if (user) { /* update */ return; } -- cgit