]> git.proxmox.com Git - libgit2.git/commitdiff
tsort: remove unused but set variable
authorschu <schu-github@schulog.org>
Thu, 7 Jul 2011 16:14:53 +0000 (18:14 +0200)
committerschu <schu-github@schulog.org>
Thu, 7 Jul 2011 16:14:53 +0000 (18:14 +0200)
Signed-off-by: schu <schu-github@schulog.org>
src/tsort.c

index 84f4d61eae5427652a5a3276bb2533b6b1a0c0f2..63fd4330406f8ebe1cdb3b2072e6e779e0f341ec 100644 (file)
@@ -40,7 +40,7 @@ typedef int (*cmp_ptr_t)(const void *, const void *);
 static int binsearch(void **dst, const void *x, size_t size, cmp_ptr_t cmp)
 {
        int l, c, r;
-       void *lx, *cx, *rx;
+       void *lx, *cx;
 
        l = 0;
        r = size - 1;
@@ -58,7 +58,6 @@ static int binsearch(void **dst, const void *x, size_t size, cmp_ptr_t cmp)
                return i;
        }
 
-       rx = dst[r];
        /* guaranteed not to be >= rx */
        cx = dst[c];
        while (1) {
@@ -66,7 +65,6 @@ static int binsearch(void **dst, const void *x, size_t size, cmp_ptr_t cmp)
                if (val < 0) {
                        if (c - l <= 1) return c;
                        r = c;
-                       rx = cx;
                } else if (val > 0) {
                        if (r - c <= 1) return c + 1;
                        l = c;