diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-09-24 15:35:56 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-09-25 12:54:55 +0200 |
commit | 2a5a764ca0f650bb188a2da43d69cb4db6855337 (patch) | |
tree | beda32c95bdaa896514e7787b7ecd52a15f2c113 /src | |
parent | 98bc17525c76803e5784560ed8c2e0e276d83444 (diff) | |
download | cmumble-2a5a764ca0f650bb188a2da43d69cb4db6855337.tar.gz cmumble-2a5a764ca0f650bb188a2da43d69cb4db6855337.tar.bz2 cmumble-2a5a764ca0f650bb188a2da43d69cb4db6855337.zip |
Do not assign and check in if
Diffstat (limited to 'src')
-rw-r--r-- | src/cmumble.c | 7 |
1 files 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; } |