瀏覽代碼

Remove special-casing for NO_METHOD in consdiffmgr.c

Nick Mathewson 7 年之前
父節點
當前提交
fd437f2a02
共有 1 個文件被更改,包括 2 次插入8 次删除
  1. 2 8
      src/or/consdiffmgr.c

+ 2 - 8
src/or/consdiffmgr.c

@@ -1100,14 +1100,8 @@ uncompress_or_copy(char **out, size_t *outlen,
   if (lv_compression)
     method = compression_method_get_by_name(lv_compression);
 
-  if (method == NO_METHOD) {
-    *out = tor_memdup_nulterm(body, bodylen);
-    *outlen = bodylen;
-    return 0;
-  } else {
-    return tor_uncompress(out, outlen, (const char *)body, bodylen,
-                          method, 1, LOG_WARN);
-  }
+  return tor_uncompress(out, outlen, (const char *)body, bodylen,
+                        method, 1, LOG_WARN);
 }
 
 /**