From 15fc2764275a2df5c8c05605f32f74a39a0b754b Mon Sep 17 00:00:00 2001
From: Ben Pfaff <blp@cs.stanford.edu>
Date: Thu, 6 Nov 2014 21:38:55 -0800
Subject: [PATCH] Factor out trailing match_bytes() from dump_value().

---
 dump.c | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/dump.c b/dump.c
index 1f5f8dc079..789daa97a8 100644
--- a/dump.c
+++ b/dump.c
@@ -227,9 +227,6 @@ dump_value(int level)
       match_byte (0);
       match_byte (1);
       match_byte (1);
-      match_byte (0);
-      match_byte (0);
-      match_byte (0);
     }
   else if (match_byte (5))
     {
@@ -238,9 +235,6 @@ dump_value(int level)
       get_string();
       if (!match_byte(1) && !match_byte(2))
         match_byte_assert(3);
-      match_byte (0);
-      match_byte (0);
-      match_byte (0);
     }
   else if (match_byte (2))
     {
@@ -257,9 +251,6 @@ dump_value(int level)
               value, format >> 16, (format >> 8) & 0xff, format & 0xff, var, vallab);
       if (!match_byte (1) && !match_byte(2))
         match_byte_assert (3);
-      match_byte (0);
-      match_byte (0);
-      match_byte (0);
     }
   else if (match_byte (4))
     {
@@ -275,9 +266,6 @@ dump_value(int level)
       value = get_string ();
       printf ("value \"%s\" format %d(%d.%d) var \"%s\" vallab \"%s\"",
               value, format >> 16, (format >> 8) & 0xff, format & 0xff, var, vallab);
-      match_byte (0);
-      match_byte (0);
-      match_byte (0);
     }
   else if (match_byte (1))
     {
@@ -289,9 +277,6 @@ dump_value(int level)
       value = get_double ();
       printf ("value %g format %d(%d.%d)", value, format >> 16, (format >> 8) & 0xff, format & 0xff);
       match_byte (1);
-      match_byte (0);
-      match_byte (0);
-      match_byte (0);
     }
   else
     {
@@ -342,6 +327,9 @@ dump_value(int level)
             }
         }
     }
+  match_byte(0);
+  match_byte(0);
+  match_byte(0);
 }
 
 static void
-- 
2.30.2