]> granicus.if.org Git - python/commitdiff
Remove redundant check fro md5module.
authorChristian Heimes <christian@python.org>
Thu, 16 Apr 2015 15:29:11 +0000 (17:29 +0200)
committerChristian Heimes <christian@python.org>
Thu, 16 Apr 2015 15:29:11 +0000 (17:29 +0200)
CID 1294331 (#1 of 1): Identical code for different branches (IDENTICAL_BRANCHES)

Modules/md5module.c

index 25b163c1794767210932df51ad05a3109a006e7d..00ee6c33796a6ce85d67da8f3edcce2c9828fd6c 100644 (file)
@@ -350,13 +350,8 @@ MD5Type_copy_impl(MD5object *self)
 {
     MD5object *newobj;
 
-    if (Py_TYPE(self) == &MD5type) {
-        if ( (newobj = newMD5object())==NULL)
-            return NULL;
-    } else {
-        if ( (newobj = newMD5object())==NULL)
-            return NULL;
-    }
+    if ((newobj = newMD5object())==NULL)
+        return NULL;
 
     newobj->hash_state = self->hash_state;
     return (PyObject *)newobj;