On Sat, Dec 27, 2014 at 04:01:36PM +0100, Peter Wu wrote: > Extract the mish block decoder such that this can be used for other > formats in the future. A new DmgHeaderState struct is introduced to > share state while decoding. > > The code is kept unchanged as much as possible, a "fail" label is added > for example where a simple return would probably do. > > Signed-off-by: Peter Wu > --- > block/dmg.c | 216 +++++++++++++++++++++++++++++++++++------------------------- > 1 file changed, 125 insertions(+), 91 deletions(-) Reviewed-by: Stefan Hajnoczi