Use MIN macro to compute a minimum

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Frediano Ziglio 2015-06-10 10:45:25 +01:00 committed by Christophe Fergeau
parent 7a081a7ced
commit 6ec714e855

View File

@ -2309,7 +2309,7 @@ uint32_t red_channel_min_pipe_size(RedChannel *channel)
RING_FOREACH(link, &channel->clients) {
rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link);
pipe_size = pipe_size < rcc->pipe_size ? pipe_size : rcc->pipe_size;
pipe_size = MIN(pipe_size, rcc->pipe_size);
}
return pipe_size == ~0 ? 0 : pipe_size;
}