[Spice-devel] [PATCH spice-server 1/4] test-playback: Remove useless check for "frame"

Uri Lublin uril at redhat.com
Tue Dec 25 09:29:55 UTC 2018


On 12/21/18 10:58 AM, Frediano Ziglio wrote:
> We just fill it up, can't be NULL.
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>

Acked-by: Uri Lublin <uril at redhat.com>

For the series.

Uri.

> ---
>   server/tests/test-playback.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/server/tests/test-playback.c b/server/tests/test-playback.c
> index cbefb9b0..32f091ef 100644
> --- a/server/tests/test-playback.c
> +++ b/server/tests/test-playback.c
> @@ -95,10 +95,8 @@ static void playback_timer_cb(SPICE_GNUC_UNUSED void *opaque)
>               frame[i] = (((uint16_t)((1<<14)*sin((t+i)/10))) << 16) + (((uint16_t)((1<<14)*sin((t+i)/10))));
>           }
>           t += num_samples;
> -        if (frame) {
> -            spice_server_playback_put_samples(&playback_instance, frame);
> -            frame = NULL;
> -        }
> +        spice_server_playback_put_samples(&playback_instance, frame);
> +        frame = NULL;
>           get_frame();
>       }
>       core->timer_start(playback_timer, playback_timer_ms);
> 



More information about the Spice-devel mailing list