diff options
author | Ron Yorston <rmy@pobox.com> | 2021-08-08 11:13:04 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2021-08-08 11:13:04 +0100 |
commit | 466cbfe6fd944a343caf29662f3b175a2ebdb7dc (patch) | |
tree | c109f9d86e42c12f9a1613e1fec8aa2f8018524a /win32/isaac.c | |
parent | c6bb78bf30f17aeac45e4bf9ea7eb1856fb5cdb7 (diff) | |
download | busybox-w32-466cbfe6fd944a343caf29662f3b175a2ebdb7dc.tar.gz busybox-w32-466cbfe6fd944a343caf29662f3b175a2ebdb7dc.tar.bz2 busybox-w32-466cbfe6fd944a343caf29662f3b175a2ebdb7dc.zip |
win32: code shrink
Save a few bytes:
- When collecting entropy prefer functions we call elsewhere.
- In uname(2) set 32-bit processor type to i686 and tweak it for
i386.
Diffstat (limited to 'win32/isaac.c')
-rw-r--r-- | win32/isaac.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/win32/isaac.c b/win32/isaac.c index 2b02eaff2..f419a3f2e 100644 --- a/win32/isaac.c +++ b/win32/isaac.c | |||
@@ -129,7 +129,7 @@ static void randinit(isaac_t *t, int flag) | |||
129 | static void get_entropy(isaac_t *t) | 129 | static void get_entropy(isaac_t *t) |
130 | { | 130 | { |
131 | int i, j, len; | 131 | int i, j, len; |
132 | SYSTEMTIME tm; | 132 | FILETIME tm; |
133 | MEMORYSTATUS ms; | 133 | MEMORYSTATUS ms; |
134 | SYSTEM_INFO si; | 134 | SYSTEM_INFO si; |
135 | LARGE_INTEGER pc; | 135 | LARGE_INTEGER pc; |
@@ -139,11 +139,11 @@ static void get_entropy(isaac_t *t) | |||
139 | unsigned char buf[16]; | 139 | unsigned char buf[16]; |
140 | 140 | ||
141 | i = 0; | 141 | i = 0; |
142 | t->randrsl[i++] = (uint32_t)GetCurrentProcessId(); | 142 | t->randrsl[i++] = (uint32_t)GetProcessId(GetCurrentProcess()); |
143 | t->randrsl[i++] = (uint32_t)GetCurrentThreadId(); | 143 | t->randrsl[i++] = (uint32_t)GetCurrentThreadId(); |
144 | t->randrsl[i++] = (uint32_t)GetTickCount(); | 144 | t->randrsl[i++] = (uint32_t)GetTickCount(); |
145 | 145 | ||
146 | GET_DATA(GetLocalTime, tm) | 146 | GET_DATA(GetSystemTimeAsFileTime, tm) |
147 | GET_DATA(GlobalMemoryStatus, ms) | 147 | GET_DATA(GlobalMemoryStatus, ms) |
148 | GET_DATA(GetSystemInfo, si) | 148 | GET_DATA(GetSystemInfo, si) |
149 | GET_DATA(QueryPerformanceCounter, pc) | 149 | GET_DATA(QueryPerformanceCounter, pc) |