← Commit list

eb773054e

Denys Vlasenko
Denys Vlasenko
2020-11-29
SUCCESS Duration: 151s

Subject

libbb: code shrink

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/xfuncs_printf.c+3 -6
@@ -633,14 +633,11 @@ void FAST_FUNC generate_uuid(uint8_t *buf)
pid_t pid;
int i;
- i = open("/dev/urandom", O_RDONLY);
- if (i >= 0) {
- read(i, buf, 16);
- close(i);
- }
+ open_read_close("/dev/urandom", buf, 16);
/* Paranoia. /dev/urandom may be missing.
* rand() is guaranteed to generate at least [0, 2^15) range,
- * but lowest bits in some libc are not so "random". */
+ * but lowest bits in some libc are not so "random".
+ */
srand(monotonic_us()); /* pulls in printf */
pid = getpid();
while (1) {