Date: Mon, 20 Jan 2020 23:43:47 +0000 (UTC) From: Conrad Meyer <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r356934 - head/lib/libc/stdlib Message-ID: <202001202343.00KNhl9A028305@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cem Date: Mon Jan 20 23:43:47 2020 New Revision: 356934 URL: https://svnweb.freebsd.org/changeset/base/356934 Log: libc: Delete unused rand.c ifdef TEST code Modified: head/lib/libc/stdlib/rand.c Modified: head/lib/libc/stdlib/rand.c ============================================================================== --- head/lib/libc/stdlib/rand.c Mon Jan 20 22:49:52 2020 (r356933) +++ head/lib/libc/stdlib/rand.c Mon Jan 20 23:43:47 2020 (r356934) @@ -45,10 +45,6 @@ __FBSDID("$FreeBSD$"); #include <syslog.h> #include "un-namespace.h" -#ifdef TEST -#include <stdio.h> -#endif /* TEST */ - static int do_rand(unsigned long *ctx) { @@ -116,33 +112,3 @@ __sranddev_fbsd12(void) } } __sym_compat(sranddev, __sranddev_fbsd12, FBSD_1.0); - - -#ifdef TEST - -main() -{ - int i; - unsigned myseed; - - printf("seeding rand with 0x19610910: \n"); - srand(0x19610910); - - printf("generating three pseudo-random numbers:\n"); - for (i = 0; i < 3; i++) - { - printf("next random number = %d\n", rand()); - } - - printf("generating the same sequence with rand_r:\n"); - myseed = 0x19610910; - for (i = 0; i < 3; i++) - { - printf("next random number = %d\n", rand_r(&myseed)); - } - - return 0; -} - -#endif /* TEST */ -
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001202343.00KNhl9A028305>