tSimplify infohash() checksum calculus - libeech - bittorrent library
 (HTM) git clone git://z3bra.org/libeech.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 286c8e057c6773a0179200a7d964e4fcb4133010
 (DIR) parent b033a8902e08c34d57038b8358ea736e77138582
 (HTM) Author: z3bra <contactatz3bradotorg>
       Date:   Thu, 19 Oct 2017 16:24:36 +0200
       
       Simplify infohash() checksum calculus
       
       Diffstat:
         M libeech.c                           |       4 +---
       
       1 file changed, 1 insertion(+), 3 deletions(-)
       ---
 (DIR) diff --git a/libeech.c b/libeech.c
       t@@ -47,9 +47,7 @@ infohash(struct torrent *t)
                if (bekv(&t->be, "info", 4, &be) < 0)
                        return NULL;
                sp = be.off;
       -        if (benext(&be) < 0)
       -                return NULL;
       -        sha1(sp, be.off - sp, hash);
       +        sha1(sp, be.end - be.start, hash);
        
                return hash;
        }