From 189dd8f8034213d476e79845ad43563eb934fcf9 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Fri, 4 Nov 2011 16:06:48 +0100 Subject: [PATCH] Fix line endings and trailing whitespace --- lib/child_process.js | 2 +- lib/cluster.js | 4 +-- src/fs_event_wrap.cc | 2 +- src/node_buffer.h | 2 +- src/node_crypto.cc | 2 +- src/node_crypto.h | 2 +- src/node_extensions.cc | 2 +- src/platform_win32.h | 58 +++++++++++++++++++++--------------------- src/tcp_wrap.cc | 2 +- src/tty_wrap.cc | 2 +- 10 files changed, 39 insertions(+), 39 deletions(-) diff --git a/lib/child_process.js b/lib/child_process.js index bb80ac11d9a..ae414861a31 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -116,7 +116,7 @@ function setupChannel(target, channel) { // For overflow protection don't write if channel queue is too deep. if (channel.writeQueueSize > 1024 * 1024) { - return false; + return false; } var buffer = Buffer(JSON.stringify(message) + '\n'); diff --git a/lib/cluster.js b/lib/cluster.js index 8c456054426..5cb1c2b0db9 100644 --- a/lib/cluster.js +++ b/lib/cluster.js @@ -56,7 +56,7 @@ exports.isMaster = ! exports.isWorker; // Specifies the script to execute for the child processes. Default is // process.argv[1] // -// options.args +// options.args // Specifies program arguments for the workers. The Default is // process.argv.slice(2) // @@ -109,7 +109,7 @@ function handleWorkerMessage(worker, message) { debug("recv " + JSON.stringify(message)); switch (message.cmd) { - case 'online': + case 'online': console.log("Worker " + worker.pid + " online"); workers[message._workerId] = worker; break; diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc index fc6d7f7794f..6fdc9a36a35 100644 --- a/src/fs_event_wrap.cc +++ b/src/fs_event_wrap.cc @@ -111,7 +111,7 @@ Handle FSEventWrap::Start(const Arguments& args) { if (!args[1]->IsTrue()) { uv_unref(uv_default_loop()); } - } else { + } else { SetErrno(uv_last_error(uv_default_loop())); } diff --git a/src/node_buffer.h b/src/node_buffer.h index 88ab410da5e..2a93a1db679 100644 --- a/src/node_buffer.h +++ b/src/node_buffer.h @@ -50,7 +50,7 @@ namespace node { Migrating code C++ Buffer code from v0.2 to v0.3 is difficult. Here are some tips: - buffer->data() calls should become Buffer::Data(buffer) calls. - - buffer->length() calls should become Buffer::Length(buffer) calls. + - buffer->length() calls should become Buffer::Length(buffer) calls. - There should not be any ObjectWrap::Unwrap() calls. You should not be storing pointers to Buffer objects at all - as they are now considered internal structures. Instead consider making a diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 5edc6beadad..a205404d2da 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -780,7 +780,7 @@ int Connection::SelectNextProtoCallback_(SSL *s, } return SSL_TLSEXT_ERR_OK; -} +} #endif #ifdef SSL_CTRL_SET_TLSEXT_SERVERNAME_CB diff --git a/src/node_crypto.h b/src/node_crypto.h index 0d6e55b030c..4cde964da46 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -193,7 +193,7 @@ class Connection : ObjectWrap { BIO *bio_read_; BIO *bio_write_; SSL *ssl_; - + bool is_server_; /* coverity[member_decl] */ }; diff --git a/src/node_extensions.cc b/src/node_extensions.cc index 4b49f4ffb7c..7073538b00b 100644 --- a/src/node_extensions.cc +++ b/src/node_extensions.cc @@ -56,7 +56,7 @@ node_module_struct* get_builtin_module(const char *name) char buf[128]; node_module_struct *cur = NULL; snprintf(buf, sizeof(buf), "node_%s", name); - /* TODO: you could look these up in a hash, but there are only + /* TODO: you could look these up in a hash, but there are only * a few, and once loaded they are cached. */ for (int i = 0; node_module_list[i] != NULL; i++) { cur = node_module_list[i]; diff --git a/src/platform_win32.h b/src/platform_win32.h index ff6ea6c6b11..0a6a5d5bfef 100644 --- a/src/platform_win32.h +++ b/src/platform_win32.h @@ -1,24 +1,24 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + #ifndef NODE_PLATFORM_WIN32_H_ #define NODE_PLATFORM_WIN32_H_ @@ -56,15 +56,15 @@ # define NOMCX #endif -#include -#include +#include +#include + +#if defined(_MSC_VER) +#define STDIN_FILENO 0 +#define STDOUT_FILENO 1 +#define STDERR_FILENO 2 +#endif -#if defined(_MSC_VER) -#define STDIN_FILENO 0 -#define STDOUT_FILENO 1 -#define STDERR_FILENO 2 -#endif - namespace node { #define NO_IMPL_MSG(...) \ diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index e43f375705d..e29a92d2def 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -422,7 +422,7 @@ Handle TCPWrap::Connect(const Arguments& args) { // I'm too lazy to come up with the perfect class hierarchy here. Let's // just do some type munging. ConnectWrap* req_wrap = new ConnectWrap(); - + int r = uv_tcp_connect(&req_wrap->req_, &wrap->handle_, address, AfterConnect); diff --git a/src/tty_wrap.cc b/src/tty_wrap.cc index 5359d7c3776..6185c80c960 100644 --- a/src/tty_wrap.cc +++ b/src/tty_wrap.cc @@ -116,7 +116,7 @@ class TTYWrap : StreamWrap { static Handle GetWindowSize(const Arguments& args) { HandleScope scope; - + UNWRAP int width, height;