mesa: fixup cast expression
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 15 Apr 2020 20:26:59 +0000 (22:26 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 16 Apr 2020 14:48:40 +0000 (14:48 +0000)
This cast-expression was meant to cast the result of the terniary
expression, but it just casted the condition expression instead. Let's
correct this, to silence a compiler-warning.

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4577>

src/mesa/main/varray.c

index 140c84de2b1cab0a578a74aa0ac16f3c7be0cc93..0dd630c7a3a05566545e47ed2f83682d38587592 100644 (file)
@@ -3793,7 +3793,7 @@ _mesa_print_arrays(struct gl_context *ctx)
               array->Ptr, _mesa_enum_to_string(array->Format.Type),
               array->Format.Size,
               array->Format._ElementSize, binding->Stride, bo ? bo->Name : 0,
-              (unsigned long) bo ? bo->Size : 0);
+              (unsigned long)(bo ? bo->Size : 0));
    }
 }