]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/vint.py
vint: remove unnecessary condition
[bup.git] / lib / bup / vint.py
index 143e5b6c75647e46bdbb3ed0bcdc3dbef35ef45b..086cb302087d8edae343631c04c68a87440c35f8 100644 (file)
@@ -85,18 +85,17 @@ def read_vint(port):
     result = 0
     offset = 0
     # Handle first byte with sign bit specially.
-    if c:
-        b = ord(c)
-        if b & 0x40:
-            negative = True
-        result |= (b & 0x3f)
-        if b & 0x80:
-            offset += 6
-            c = port.read(1)
-        elif negative:
-            return -result
-        else:
-            return result
+    b = ord(c)
+    if b & 0x40:
+        negative = True
+    result |= (b & 0x3f)
+    if b & 0x80:
+        offset += 6
+        c = port.read(1)
+    elif negative:
+        return -result
+    else:
+        return result
     while True:
         b = ord(c)
         if b & 0x80: