diff options
author | Carmelo Amoroso <carmelo.amoroso@st.com> | 2007-11-20 10:09:16 +0000 |
---|---|---|
committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2007-11-20 10:09:16 +0000 |
commit | 244539cd0852bbcf8f21507d7ff866d8e7fcff18 (patch) | |
tree | 5a04e6a195814b645007e4ccecb128d8c7b31ee7 /libc/misc/internals/tempname.c | |
parent | 1cac0350028cc4a47715f63e61379d3318b0c965 (diff) | |
download | uClibc-alpine-244539cd0852bbcf8f21507d7ff866d8e7fcff18.tar.bz2 uClibc-alpine-244539cd0852bbcf8f21507d7ff866d8e7fcff18.tar.xz |
Fix Makefile.in and synch them with trunk. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libc/misc/internals/tempname.c')
-rw-r--r-- | libc/misc/internals/tempname.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/libc/misc/internals/tempname.c b/libc/misc/internals/tempname.c index 26918dc16..dc125020b 100644 --- a/libc/misc/internals/tempname.c +++ b/libc/misc/internals/tempname.c @@ -206,18 +206,17 @@ int attribute_hidden __gen_tempname (char *tmpl, int kind) return -1; } - /* Get some random data. */ - if (fillrand(randomness, sizeof(randomness)) != sizeof(randomness)) { - /* if random device nodes failed us, lets use the braindamaged ver */ - brain_damaged_fillrand(randomness, sizeof(randomness)); - } - - for (i = 0; i < sizeof(randomness); ++i) - XXXXXX[i] = letters[(randomness[i]) % NUM_LETTERS]; - for (i = 0; i < TMP_MAX; ++i) { + int j; + /* Get some random data. */ + if (fillrand(randomness, sizeof(randomness)) != sizeof(randomness)) { + /* if random device nodes failed us, lets use the braindamaged ver */ + brain_damaged_fillrand(randomness, sizeof(randomness)); + } + for (j = 0; j < sizeof(randomness); ++j) + XXXXXX[j] = letters[randomness[j] % NUM_LETTERS]; - switch(kind) { + switch (kind) { case __GT_NOCREATE: { struct stat st; |