diff options
author | Marvin Borner | 2020-08-22 19:44:49 +0200 |
---|---|---|
committer | Marvin Borner | 2020-08-22 19:44:49 +0200 |
commit | 8bb7b5cceaaf96a5dd6321d35aae28748896d87b (patch) | |
tree | 9a4103fb1da636fdf0c5ec8f04425c0c388f527d /libc/random.c | |
parent | 424dc57424ee17de77d689443f95d2e1bed72f4a (diff) |
Added *very* basic polling ipc
Diffstat (limited to 'libc/random.c')
-rw-r--r-- | libc/random.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libc/random.c b/libc/random.c index 7ad8a67..086fa11 100644 --- a/libc/random.c +++ b/libc/random.c @@ -19,6 +19,9 @@ u32 rand() char *randstr(u32 size) { + if (!size) + return NULL; + char *buf = malloc(size + 1); const char charset[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; |