Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=07f766885879a1fd4502fb8dd531d1fe3c575510
Commit:     07f766885879a1fd4502fb8dd531d1fe3c575510
Parent:     75ff4309cdb1d7303750aeed07a5d80382fe2e71
Author:     Ladislav Michl <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 9 16:36:19 2008 +0100
Committer:  Sam Ravnborg <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 23:14:38 2008 +0100

    kconfig: use C89 random functions in conf.c
    
    rand and srand functions conform also to C89 in addition to POSIX.1-2001,
    which makes them a bit more portable (work also on MinGW host). Linux man
    page also says:
    "The versions of rand() and srand() in the Linux C Library use the same
    random number generator as random() and srandom()".
    
    * Use C89 conformant functions rand() and srand()
    
    Signed-off-by: Ladislav Michl <[EMAIL PROTECTED]>
    Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
    Cc: Roman Zippel <[EMAIL PROTECTED]>
---
 scripts/kconfig/conf.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index a3d2d0b..01c2f35 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -375,7 +375,7 @@ static int conf_choice(struct menu *menu)
                        break;
                case set_random:
                        if (is_new)
-                               def = (random() % cnt) + 1;
+                               def = (rand() % cnt) + 1;
                case set_default:
                case set_yes:
                case set_mod:
@@ -526,7 +526,7 @@ int main(int ac, char **av)
                        break;
                case 'r':
                        input_mode = set_random;
-                       srandom(time(NULL));
+                       srand(time(NULL));
                        break;
                case 'h':
                        printf("See README for usage info\n");
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to