diff options
author | hap <happppp@users.noreply.github.com> | 2019-08-01 17:53:21 +0200 |
---|---|---|
committer | hap <happppp@users.noreply.github.com> | 2019-08-01 17:53:36 +0200 |
commit | 23c70e8b601969b4a827b79dba5840bcdb442315 (patch) | |
tree | 7e1d4b1e7bcd3ca63dcccac842a99aa3cc98a3f3 /src/lib/util | |
parent | 602d266bcfa2098affce6cf965d6c1d3f029f8f9 (diff) |
coreutil: remove single-use (and savestate unsafe) rand_memory function (nw)
Diffstat (limited to 'src/lib/util')
-rw-r--r-- | src/lib/util/coreutil.cpp | 23 | ||||
-rw-r--r-- | src/lib/util/coreutil.h | 2 |
2 files changed, 0 insertions, 25 deletions
diff --git a/src/lib/util/coreutil.cpp b/src/lib/util/coreutil.cpp index bd10802ef5a..d973080e354 100644 --- a/src/lib/util/coreutil.cpp +++ b/src/lib/util/coreutil.cpp @@ -62,29 +62,6 @@ uint32_t bcd_2_dec(uint32_t a) MISC ***************************************************************************/ -/** - * @fn void rand_memory(void *memory, size_t length) - * - * @brief Random memory. - * - * @param [in,out] memory If non-null, the memory. - * @param length The length. - */ - -void rand_memory(void *memory, size_t length) -{ - static uint32_t seed = 0; - uint8_t *bytes = (uint8_t *) memory; - size_t i; - - for (i = 0; i < length; i++) - { - seed = seed * 214013 + 2531011; - bytes[i] = (uint8_t) (seed >> 16); - } -} - - uint32_t core_crc32(uint32_t crc, const uint8_t *buf, uint32_t len) { return crc32(crc, buf, len); diff --git a/src/lib/util/coreutil.h b/src/lib/util/coreutil.h index cf5106f953d..a0166818da8 100644 --- a/src/lib/util/coreutil.h +++ b/src/lib/util/coreutil.h @@ -77,8 +77,6 @@ inline int gregorian_days_in_month(int month, int year) MISC ***************************************************************************/ -void rand_memory(void *memory, size_t length); - uint32_t core_crc32(uint32_t crc, const uint8_t *buf, uint32_t len); #endif // MAME_UTIL_COREUTIL_H |