aboutsummaryrefslogtreecommitdiffstats
path: root/libgamma_value_of_subpixel_order.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libgamma_value_of_subpixel_order.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libgamma_value_of_subpixel_order.c b/libgamma_value_of_subpixel_order.c
index ed81435..1a66c9f 100644
--- a/libgamma_value_of_subpixel_order.c
+++ b/libgamma_value_of_subpixel_order.c
@@ -16,15 +16,14 @@ int
libgamma_value_of_subpixel_order(const char *order, enum libgamma_subpixel_order *out)
{
#define X(CONST, NAME, ...)\
- if (!strcmp(order, NAME)) {\
- *out = CONST;\
- return 0;\
- }
+ if (!strcmp(order, NAME))\
+ goto case_##CONST;
LIST_SUBPIXEL_ORDERS(X)
#undef X
#define X(CONST, ...)\
if (!strcmp(order, #CONST)) {\
+ case_##CONST:\
*out = CONST;\
return 0;\
}