Replace confusing if (c) return false; else return true; by simple boolean expression.
authorChristoph Mallon <christoph.mallon@gmx.de>
Sun, 18 Nov 2007 11:38:07 +0000 (11:38 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sun, 18 Nov 2007 11:38:07 +0000 (11:38 +0000)
[r18481]

parser.c

index 9662b9d..1d9e15f 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1107,12 +1107,11 @@ static declaration_t *parse_enum_specifier(void)
  */
 static bool is_typedef_symbol(symbol_t *symbol)
 {
-       declaration_t *declaration = get_declaration(symbol, NAMESPACE_NORMAL);
-       if(declaration == NULL
-                       || declaration->storage_class != STORAGE_CLASS_TYPEDEF)
-               return false;
-
-       return true;
+       const declaration_t *const declaration =
+               get_declaration(symbol, NAMESPACE_NORMAL);
+       return
+               declaration != NULL &&
+               declaration->storage_class == STORAGE_CLASS_TYPEDEF;
 }
 
 static type_t *parse_typeof(void)