Simplify dump_category() a bit.
authorBen Pfaff <blp@cs.stanford.edu>
Fri, 7 Nov 2014 06:18:04 +0000 (22:18 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Fri, 7 Nov 2014 06:18:04 +0000 (22:18 -0800)
dump.c

diff --git a/dump.c b/dump.c
index d403c0fd77cdbd396411bde58275d14767f21e8c..7aec55607eb352680d239cc166cc6064bc5c8a98 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -355,34 +355,21 @@ dump_dim_value(int level)
 static void
 dump_category(int level)
 {
-  match_byte (0);
-  match_byte (0);
-  match_byte (0);
-  match_byte (0);
   dump_value (level);
 
-  if (match_u32 (2))
-    get_u32 ();
-  else if (match_u32 (1))
-    {
-      match_byte (0);
-      match_byte (0);
-      match_byte (0);
-      get_u32 ();
-    }
+  if (match_u32 (1))
+    match_byte (0);
   else if (match_byte (1))
     {
       match_byte (0);
       if (!match_u32 (2))
         match_u32_assert (1);
       match_byte (0);
-      get_u32();
-    }
-  else
-    {
-      match_u32_assert (0);
-      get_u32 ();
     }
+  else if (!match_u32(2))
+    match_u32_assert (0);
+
+  get_u32 ();
 
   int n_categories = get_u32();
   if (n_categories > 0)