diff mbox

[i-g-t] lib: Use igt_assert_eq in CHECK_RETURN

Message ID 1481092598-3892-1-git-send-email-tomeu.vizoso@collabora.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tomeu Vizoso Dec. 7, 2016, 6:36 a.m. UTC
So that debug logs contain the unexpected value.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
---
 lib/igt_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Abdiel Janulgue Dec. 7, 2016, 10:02 a.m. UTC | #1
On 12/07/2016 08:36 AM, Tomeu Vizoso wrote:
> So that debug logs contain the unexpected value.
> 
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>

Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>

> ---
>  lib/igt_kms.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 989704e14803..1e30ddcc5373 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -1681,7 +1681,7 @@ static uint32_t igt_plane_get_fb_gem_handle(igt_plane_t *plane)
>  #define CHECK_RETURN(r, fail) {	\
>  	if (r && !fail)		\
>  		return r;	\
> -	igt_assert(r == 0);	\
> +	igt_assert_eq(r, 0);	\
>  }
>  
>  
>
diff mbox

Patch

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 989704e14803..1e30ddcc5373 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1681,7 +1681,7 @@  static uint32_t igt_plane_get_fb_gem_handle(igt_plane_t *plane)
 #define CHECK_RETURN(r, fail) {	\
 	if (r && !fail)		\
 		return r;	\
-	igt_assert(r == 0);	\
+	igt_assert_eq(r, 0);	\
 }