Re: [PATCH spice-server] dcc: Use more portable mnemonic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, Jun 06, 2017 at 09:40:31AM +0100, Frediano Ziglio wrote:
> The maximum value for a 32 bit variable is UINT32_MAX and not
> UINT_MAX. Currently all supported platforms have these two
> constants having the same value so this patch don't change
> nothing in the generated code but potentially this could
> change in a future.
>
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>

Grep shows one more, but that is unsigned int...

server/dcc.c:1058:    if (report->num_frames == 0 && report->num_drops == UINT_MAX) {
server/red-qxl.c:986:    qxl_state->max_monitors = UINT_MAX;

 struct QXLState {
   ...
     unsigned int max_monitors;
 };

Acked-by: Victor Toso <victortoso@xxxxxxxxxx>

> ---
>  server/dcc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/server/dcc.c b/server/dcc.c
> index 4d5c8a0..dbc496c 100644
> --- a/server/dcc.c
> +++ b/server/dcc.c
> @@ -1055,7 +1055,7 @@ static bool dcc_handle_stream_report(DisplayChannelClient *dcc,
>          return TRUE;
>      }
>  
> -    if (report->num_frames == 0 && report->num_drops == UINT_MAX) {
> +    if (report->num_frames == 0 && report->num_drops == UINT32_MAX) {
>          spice_warning("stream_report: the client does not support stream %u",
>                        report->stream_id);
>          /* Stop streaming the video so the client can see it */
> -- 
> 2.9.4
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]