gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r28424 - in libmicrohttpd: . src/examples


From: gnunet
Subject: [GNUnet-SVN] r28424 - in libmicrohttpd: . src/examples
Date: Wed, 7 Aug 2013 08:19:33 +0200

Author: grothoff
Date: 2013-08-07 08:19:33 +0200 (Wed, 07 Aug 2013)
New Revision: 28424

Modified:
   libmicrohttpd/AUTHORS
   libmicrohttpd/ChangeLog
   libmicrohttpd/src/examples/post_example.c
Log:
-use more portable rand instead of random

Modified: libmicrohttpd/AUTHORS
===================================================================
--- libmicrohttpd/AUTHORS       2013-08-06 20:46:22 UTC (rev 28423)
+++ libmicrohttpd/AUTHORS       2013-08-07 06:19:33 UTC (rev 28424)
@@ -23,6 +23,7 @@
 David Carvalho <address@hidden>
 David Reiss <address@hidden>
 Matt Holiday 
+Michael Cronenworth <address@hidden>
 Mika Raento <address@hidden>
 Mike Crowe <address@hidden>
 John Muth <address@hidden>

Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog     2013-08-06 20:46:22 UTC (rev 28423)
+++ libmicrohttpd/ChangeLog     2013-08-07 06:19:33 UTC (rev 28424)
@@ -1,3 +1,6 @@
+Wed Aug  7 08:17:40 CEST 2013
+       Removing dependency on PlibC. -MC
+
 Fri Aug  2 20:55:47 CEST 2013
        Fix HTTP 1.1 compliance with respect to not returning
        content-length headers for successful "CONNECT" requests.

Modified: libmicrohttpd/src/examples/post_example.c
===================================================================
--- libmicrohttpd/src/examples/post_example.c   2013-08-06 20:46:22 UTC (rev 
28423)
+++ libmicrohttpd/src/examples/post_example.c   2013-08-07 06:19:33 UTC (rev 
28424)
@@ -180,10 +180,10 @@
   snprintf (ret->sid,
            sizeof (ret->sid),
            "%X%X%X%X",
-           (unsigned int) random (),
-           (unsigned int) random (),
-           (unsigned int) random (),
-           (unsigned int) random ());
+           (unsigned int) rand (),
+           (unsigned int) rand (),
+           (unsigned int) rand (),
+           (unsigned int) rand ());
   ret->rc++;  
   ret->start = time (NULL);
   ret->next = sessions;
@@ -319,7 +319,7 @@
 
   reply = malloc (strlen (form) + strlen (session->value_1) + 1);
   if (NULL == reply)
-    return NULL;
+    return MHD_NO;
   snprintf (reply,
            strlen (form) + strlen (session->value_1) + 1,
            form,
@@ -715,7 +715,7 @@
       return 1;
     }
   /* initialize PRNG */
-  srandom ((unsigned int) time (NULL));
+  srand ((unsigned int) time (NULL));
   d = MHD_start_daemon (MHD_USE_DEBUG,
                         atoi (argv[1]),
                         NULL, NULL, 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]