Browse Source

src: fix readability/braces cpplint warnings

PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
v4.x
Ben Noordhuis 9 years ago
committed by Myles Borins
parent
commit
16f2497994
  1. 4
      src/cares_wrap.cc
  2. 4
      src/node_http_parser.cc

4
src/cares_wrap.cc

@ -369,11 +369,11 @@ class QueryWrap : public AsyncWrap {
// Subclasses should implement the appropriate Parse method. // Subclasses should implement the appropriate Parse method.
virtual void Parse(unsigned char* buf, int len) { virtual void Parse(unsigned char* buf, int len) {
UNREACHABLE(); UNREACHABLE();
}; }
virtual void Parse(struct hostent* host) { virtual void Parse(struct hostent* host) {
UNREACHABLE(); UNREACHABLE();
}; }
}; };

4
src/node_http_parser.cc

@ -108,9 +108,9 @@ struct StringPtr {
void Update(const char* str, size_t size) { void Update(const char* str, size_t size) {
if (str_ == nullptr) if (str_ == nullptr) {
str_ = str; str_ = str;
else if (on_heap_ || str_ + size_ != str) { } else if (on_heap_ || str_ + size_ != str) {
// Non-consecutive input, make a copy on the heap. // Non-consecutive input, make a copy on the heap.
// TODO(bnoordhuis) Use slab allocation, O(n) allocs is bad. // TODO(bnoordhuis) Use slab allocation, O(n) allocs is bad.
char* s = new char[size_ + size]; char* s = new char[size_ + size];

Loading…
Cancel
Save