aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-05-14 17:58:25 +0200
committerMattias Andrée <maandree@operamail.com>2015-05-14 17:58:25 +0200
commita4ba0e7e19b71185343a8c6480e1fdb3e792c473 (patch)
tree091b009b4b05f03ee23c37aef322e354266916e3
parentbump year (diff)
downloadlibgamma-a4ba0e7e19b71185343a8c6480e1fdb3e792c473.tar.gz
libgamma-a4ba0e7e19b71185343a8c6480e1fdb3e792c473.tar.bz2
libgamma-a4ba0e7e19b71185343a8c6480e1fdb3e792c473.tar.xz
test: add an error check just to be safe
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--src/test/test.c16
1 files 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