Introduction
Introduction Statistics Contact Development Disclaimer Help
fixed time seed issue - fiche - A pastebin adjusted for gopher use
git clone git://vernunftzentrum.de/fiche.git
Log
Files
Refs
LICENSE
---
commit ebe5c33cd626dfc9a09e608707f1db5cab8a84f1
parent c1e0d782ed0e1abed028122e08a8adde09edbcd4
Author: solusipse <[email protected]>
Date: Fri, 6 Sep 2013 05:03:11 +0200
fixed time seed issue
Diffstat:
fiche.c | 4 ++--
fiche.h | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/fiche.c b/fiche.c
@@ -27,7 +27,7 @@ $ cat fiche.c | nc localhost 9999
int main(int argc, char **argv)
{
- srand((unsigned int) time(0));
+ time_seed = time(0);
set_basedir();
parse_parameters(argc, argv);
@@ -156,7 +156,7 @@ void bind_to_port(int listen_socket, struct sockaddr_in ser…
void generate_url(char *buffer, char *slug)
{
- int i, time_seed = time(0);
+ int i;
memset(slug, '\0', sizeof(slug));
for (i = 0; i <= SLUG_SIZE - 1; i++)
diff --git a/fiche.h b/fiche.h
@@ -39,6 +39,7 @@ $ cat fiche.c | nc localhost 9999
#include <sys/socket.h>
#include <netinet/in.h>
+int time_seed;
char *BASEDIR;
int PORT = 9999;
int SLUG_SIZE = 4;
You are viewing proxied material from vernunftzentrum.de. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.