From: Ben Pfaff Date: Fri, 7 Nov 2014 06:18:04 +0000 (-0800) Subject: Simplify dump_category() a bit. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64aed3751b38127cb4302844bfb3b5eddb1fefd0;p=pspp Simplify dump_category() a bit. --- diff --git a/dump.c b/dump.c index d403c0fd77..7aec55607e 100644 --- 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)