pulse-server: simplify a condition

`a || (!a && b)` equals `a || b` due to the
short-circuiting nature of `||` and `&&`.
This commit is contained in:
Barnabás Pőcze 2022-01-31 12:31:54 +01:00 committed by Wim Taymans
parent 6d0075b4e9
commit 5db2c6cc32

View file

@ -2159,7 +2159,7 @@ static int do_finish_upload_stream(struct client *client, uint32_t command, uint
channel, name);
struct sample *old = find_sample(impl, SPA_ID_INVALID, name);
if (old == NULL || (old != NULL && old->ref > 1)) {
if (old == NULL || old->ref > 1) {
sample = calloc(1, sizeof(*sample));
if (sample == NULL)
goto error_errno;