Browse Source

simplify code (thx, henning)

Felix Fietkau 14 years ago
parent
commit
8bc580cbda
1 changed files with 2 additions and 12 deletions
  1. 2 12
      ucimap.c

+ 2 - 12
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