Commit 668cda01e8b55541c7415529a5ae76d1f08bcee6

Daniel Mendler 2019-05-13T19:18:09

remove unnecessary duplication of multiplication

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/tommath_private.h b/tommath_private.h
index 521b1bc..0956da0 100644
--- a/tommath_private.h
+++ b/tommath_private.h
@@ -47,8 +47,9 @@ do {                                                    \
    int fd_ = (digits);                                  \
    void* fm_ = (mem);                                   \
    if (fm_ != NULL) {                                   \
-      MP_ZERO_BUFFER(fm_, sizeof(mp_digit) * (size_t)fd_); \
-      MP_FREE(fm_, sizeof(mp_digit) * (size_t)fd_);     \
+      size_t fs_ = sizeof (mp_digit) * (size_t)fd_;     \
+      MP_ZERO_BUFFER(fm_, fs_);                         \
+      MP_FREE(fm_, fs_);                                \
    }                                                    \
 } while (0)
 #endif