From 8bc580cbda5c9dddedb3340208b0b55734ce9750 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 23 Jan 2010 20:55:55 +0100 Subject: [PATCH] simplify code (thx, henning) --- ucimap.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/ucimap.c b/ucimap.c index 52c920b..9853e7e 100644 --- a/ucimap.c +++ b/ucimap.c @@ -59,23 +59,13 @@ struct ucimap_fixup { static inline bool ucimap_is_alloc(enum ucimap_type type) { - switch(type & UCIMAP_SUBTYPE) { - case UCIMAP_STRING: - return true; - default: - return false; - } + return (type & UCIMAP_SUBTYPE) == UCIMAP_STRING; } static inline bool ucimap_is_fixup(enum ucimap_type type) { - switch(type & UCIMAP_SUBTYPE) { - case UCIMAP_SECTION: - return true; - default: - return false; - } + return (type & UCIMAP_SUBTYPE) == UCIMAP_SECTION; } static inline bool -- 2.41.0