# HG changeset patch # User aurel # Date 1217896975 0 # Node ID bce0dc9310875c5dd81f2f149966cc8575212409 # Parent eb4649280c363900f2dcdc954c46cbc759a794f6 matroskadec: simplify matroska_ebmlnum_sint() diff -r eb4649280c36 -r bce0dc931087 matroskadec.c --- a/matroskadec.c Tue Aug 05 00:42:52 2008 +0000 +++ b/matroskadec.c Tue Aug 05 00:42:55 2008 +0000 @@ -660,10 +660,7 @@ return res; /* make signed (weird way) */ - if (unum == (uint64_t)-1) - *num = INT64_MAX; - else - *num = unum - ((1LL << ((7 * res) - 1)) - 1); + *num = unum - ((1LL << (7*res - 1)) - 1); return res; }