Author: [email protected]
Date: Tue Feb 24 06:22:42 2009
New Revision: 1351

Modified:
    branches/bleeding_edge/src/platform-freebsd.cc
    branches/bleeding_edge/src/platform-linux.cc
    branches/bleeding_edge/src/platform-macos.cc
    branches/bleeding_edge/src/platform-win32.cc
    branches/bleeding_edge/src/platform.h
    branches/bleeding_edge/test/cctest/test-sockets.cc

Log:
Fixed lint errors.

The previous commit (r1349) resulted in a number of lint errors - extra  
whitespace and a missing explicit on a constructor in the test. These has  
been fixed.

[email protected]
Review URL: http://codereview.chromium.org/27089

Modified: branches/bleeding_edge/src/platform-freebsd.cc
==============================================================================
--- branches/bleeding_edge/src/platform-freebsd.cc      (original)
+++ branches/bleeding_edge/src/platform-freebsd.cc      Tue Feb 24 06:22:42 2009
@@ -647,9 +647,9 @@
    }

    // Server initialization.
-  bool Bind (const int port);
+  bool Bind(const int port);
    bool Listen(int backlog) const;
-  Socket* Accept () const;
+  Socket* Accept() const;

    // Client initialization.
    bool Connect(const char* host, const char* port);
@@ -678,7 +678,7 @@
    addr.sin_port = htons(port);
    int status = bind(socket_,
                      reinterpret_cast<struct sockaddr *>(&addr),
-                    sizeof (addr));
+                    sizeof(addr));
    return status == 0;
  }

@@ -723,7 +723,7 @@
    if (status != 0) {
      return false;
    }
-
+
    // Connect.
    status = connect(socket_, result->ai_addr, result->ai_addrlen);
    return status == 0;

Modified: branches/bleeding_edge/src/platform-linux.cc
==============================================================================
--- branches/bleeding_edge/src/platform-linux.cc        (original)
+++ branches/bleeding_edge/src/platform-linux.cc        Tue Feb 24 06:22:42 2009
@@ -631,9 +631,9 @@
    }

    // Server initialization.
-  bool Bind (const int port);
+  bool Bind(const int port);
    bool Listen(int backlog) const;
-  Socket* Accept () const;
+  Socket* Accept() const;

    // Client initialization.
    bool Connect(const char* host, const char* port);
@@ -662,7 +662,7 @@
    addr.sin_port = htons(port);
    int status = bind(socket_,
                      reinterpret_cast<struct sockaddr *>(&addr),
-                    sizeof (addr));
+                    sizeof(addr));
    return status == 0;
  }

@@ -707,7 +707,7 @@
    if (status != 0) {
      return false;
    }
-
+
    // Connect.
    status = connect(socket_, result->ai_addr, result->ai_addrlen);
    return status == 0;

Modified: branches/bleeding_edge/src/platform-macos.cc
==============================================================================
--- branches/bleeding_edge/src/platform-macos.cc        (original)
+++ branches/bleeding_edge/src/platform-macos.cc        Tue Feb 24 06:22:42 2009
@@ -598,9 +598,9 @@
    }

    // Server initialization.
-  bool Bind (const int port);
+  bool Bind(const int port);
    bool Listen(int backlog) const;
-  Socket* Accept () const;
+  Socket* Accept() const;

    // Client initialization.
    bool Connect(const char* host, const char* port);
@@ -635,7 +635,7 @@
    addr.sin_port = htons(port);
    status = bind(socket_,
                  reinterpret_cast<struct sockaddr *>(&addr),
-                sizeof (addr));
+                sizeof(addr));
    return status == 0;
  }

@@ -680,7 +680,7 @@
    if (status != 0) {
      return false;
    }
-
+
    // Connect.
    status = connect(socket_, result->ai_addr, result->ai_addrlen);
    return status == 0;

Modified: branches/bleeding_edge/src/platform-win32.cc
==============================================================================
--- branches/bleeding_edge/src/platform-win32.cc        (original)
+++ branches/bleeding_edge/src/platform-win32.cc        Tue Feb 24 06:22:42 2009
@@ -1574,9 +1574,9 @@
    }

    // Server initialization.
-  bool Bind (const int port);
+  bool Bind(const int port);
    bool Listen(int backlog) const;
-  Socket* Accept () const;
+  Socket* Accept() const;

    // Client initialization.
    bool Connect(const char* host, const char* port);
@@ -1605,7 +1605,7 @@
    addr.sin_port = htons(port);
    int status = bind(socket_,
                      reinterpret_cast<struct sockaddr *>(&addr),
-                    sizeof (addr));
+                    sizeof(addr));
    return status == 0;
  }

@@ -1650,7 +1650,7 @@
    if (status != 0) {
      return false;
    }
-
+
    // Connect.
    status = connect(socket_, result->ai_addr, result->ai_addrlen);
    return status == 0;

Modified: branches/bleeding_edge/src/platform.h
==============================================================================
--- branches/bleeding_edge/src/platform.h       (original)
+++ branches/bleeding_edge/src/platform.h       Tue Feb 24 06:22:42 2009
@@ -428,7 +428,7 @@
    virtual ~Socket() {}

    // Server initialization.
-  virtual bool Bind (const int port) = 0;
+  virtual bool Bind(const int port) = 0;
    virtual bool Listen(int backlog) const = 0;
    virtual Socket* Accept() const = 0;


Modified: branches/bleeding_edge/test/cctest/test-sockets.cc
==============================================================================
--- branches/bleeding_edge/test/cctest/test-sockets.cc  (original)
+++ branches/bleeding_edge/test/cctest/test-sockets.cc  Tue Feb 24 06:22:42  
2009
@@ -13,9 +13,9 @@

  class SocketListenerThread : public Thread {
   public:
-  SocketListenerThread(int data_size) : data_size_(data_size),
-                                        server_(NULL), client_(NULL),
-                                        listening_(OS::CreateSemaphore(0))  
{
+  explicit SocketListenerThread(int data_size)
+      : data_size_(data_size), server_(NULL), client_(NULL),
+        listening_(OS::CreateSemaphore(0)) {
      data_ = new char[data_size_];
    }
    ~SocketListenerThread() {
@@ -50,7 +50,7 @@
    ok = server_->Listen(1);
    CHECK(ok);
    listening_->Signal();
-
+
    // Accept a connection.
    client_ = server_->Accept();
    CHECK(client_ != NULL);
@@ -70,7 +70,7 @@
    SocketListenerThread* listener = new SocketListenerThread(len);
    listener->Start();
    listener->WaitForListening();
-
+
    // Connect and write some data.
    Socket* client = OS::CreateSocket();
    CHECK(client != NULL);

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to