diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2010-12-01 09:57:16 -0800 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2010-12-01 09:57:16 -0800 |
commit | d29b5db695225ed9629b028f99070bd182320b0f (patch) | |
tree | 4b219831f8fc3a43ea03c1f554b8827c14024d2f /org.eclipse.jgit/src/org | |
parent | b4359cb8294de1e80147f00caabad9ebd6b7bce1 (diff) | |
download | jgit-d29b5db695225ed9629b028f99070bd182320b0f.tar.gz jgit-d29b5db695225ed9629b028f99070bd182320b0f.zip |
Remove unused 'shift' variable from PackFile
This variable was not used for anything, but Eclipse's JDT failed to
notice because of the "shift += " operation within the body of the
while loop. Here we don't need the shift because we do not decode the
length, but we do have to skip over the bytes that store the length to
locate the delta base.
Bug: 331319
Change-Id: I200a874fd7e39e3adf2640b8cd0f53dcf91ef4c9
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
CC: Remy Suen <remysuen@ca.ibm.com>
Diffstat (limited to 'org.eclipse.jgit/src/org')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackFile.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackFile.java index fef38ccac0..54af0ff838 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackFile.java @@ -758,12 +758,9 @@ public class PackFile implements Iterable<PackIndex.MutableEntry> { readFully(pos, ib, 0, 20, curs); int c = ib[0] & 0xff; final int type = (c >> 4) & 7; - int shift = 4; int p = 1; - while ((c & 0x80) != 0) { + while ((c & 0x80) != 0) c = ib[p++] & 0xff; - shift += 7; - } switch (type) { case Constants.OBJ_COMMIT: |