ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/Search/HttpHandler.cpp
(Generate patch)

Comparing trunk/Search/HttpHandler.cpp (file contents):
Revision 347 by Douglas Thrift, 2004-04-05T16:37:41-07:00 vs.
Revision 348 by Douglas Thrift, 2004-05-26T17:44:17-07:00

# Line 773 | Line 773 | bool HttpHandler::starttls()
773          SSL_library_init();
774  
775   #ifndef _urandomdev_
776 <        int pid = getpid();
777 <        int now = time(NULL);
778 <
779 <        unsigned seed = now > pid ? now - pid : pid - now;
780 <
776 >        int pid(getpid()), now(time(NULL));
777 >        unsigned seed(now > pid ? now - pid : pid - now);
778          char* junk = new char[seed % 30 + 2];
779 +
780          junk[0] = pid;
781          junk[seed % 30 + 1] = now;
782  
783          srand(seed);
784  
785 <        for (int index = 1; index < seed % 30 + 1; index++)
785 >        for (size_t index = 1; index < seed % 30 + 1; index++)
786          {
787                  junk[index] = rand();
788          }
# Line 793 | Line 791 | bool HttpHandler::starttls()
791          {
792                  cerr << "junk = {\n";
793  
794 <                for (int index = 1; index < seed % 30 + 2; index++)
794 >                for (size_t index = 1; index < seed % 30 + 2; index++)
795                  {
796 <                        cerr << "   [" << index << "] = " << int(junk[index]) << "\n";
796 >                        cerr << "   [" << index << "] = " << unsigned(junk[index]) << "\n";
797                  }
798  
799                  cerr << "}\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines