File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change 4
4
* darcy@druid.net
5
5
* http://www.druid.net/darcy/
6
6
*
7
- * $Id: chkpass.c,v 1.10 2003/07/24 17:52:12 tgl Exp $
7
+ * $Id: chkpass.c,v 1.11 2003/09/07 15:27:25 tgl Exp $
8
8
* best viewed with tabs set to 4
9
9
*/
10
10
@@ -69,7 +69,6 @@ chkpass_in(PG_FUNCTION_ARGS)
69
69
char * str = PG_GETARG_CSTRING (0 );
70
70
chkpass * result ;
71
71
char mysalt [4 ];
72
- static bool random_initialized = false;
73
72
static char salt_chars [] =
74
73
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" ;
75
74
@@ -93,12 +92,6 @@ chkpass_in(PG_FUNCTION_ARGS)
93
92
94
93
result = (chkpass * ) palloc (sizeof (chkpass ));
95
94
96
- if (!random_initialized )
97
- {
98
- srandom ((unsigned int ) time (NULL ));
99
- random_initialized = true;
100
- }
101
-
102
95
mysalt [0 ] = salt_chars [random () & 0x3f ];
103
96
mysalt [1 ] = salt_chars [random () & 0x3f ];
104
97
mysalt [2 ] = 0 ; /* technically the terminator is not
You can’t perform that action at this time.
0 commit comments