diff options
Diffstat (limited to 'userland/libc/stdlib/mkstemp.c')
-rw-r--r-- | userland/libc/stdlib/mkstemp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/userland/libc/stdlib/mkstemp.c b/userland/libc/stdlib/mkstemp.c index 1ea8790..0dec8e9 100644 --- a/userland/libc/stdlib/mkstemp.c +++ b/userland/libc/stdlib/mkstemp.c @@ -1,14 +1,17 @@ #include <fcntl.h> #include <stdlib.h> -char rand_char(void) { return 'A' + (rand() % 10); } +char rand_char(void) { + return 'A' + (rand() % 10); +} int mkstemp(char *template) { // FIXME: Incomplete const char *s = template; for (; *template; template ++) { - if ('X' == *template) + if ('X' == *template) { *template = rand_char(); + } } return open(s, O_RDWR, O_CREAT); } |