From a4ba0e7e19b71185343a8c6480e1fdb3e792c473 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 14 May 2015 17:58:25 +0200 Subject: test: add an error check just to be safe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/test/test.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/test/test.c b/src/test/test.c index 6a4820d..30d2952 100644 --- a/src/test/test.c +++ b/src/test/test.c @@ -67,12 +67,16 @@ int main(void) #undef X /* Fill gamma ramps, for each depth, with the CRTC:s current ramps. */ -#define X(R) \ - libgamma_crtc_get_gamma_##R(crtc_state, &old_##R); \ - if ((rr |= r = libgamma_crtc_get_gamma_##R(crtc_state, &R))) \ - { \ - libgamma_perror("libgamma_crtc_get_gamma_" #R, r); \ - goto done; \ +#define X(R) \ + if ((rr |= r = libgamma_crtc_get_gamma_##R(crtc_state, &old_##R))) \ + { \ + libgamma_perror("libgamma_crtc_get_gamma_" #R, r); \ + goto done; \ + } \ + if ((rr |= r = libgamma_crtc_get_gamma_##R(crtc_state, &R))) \ + { \ + libgamma_perror("libgamma_crtc_get_gamma_" #R, r); \ + goto done; \ } LIST_RAMPS #undef X -- cgit v1.2.3-70-g09d2