From 16f2497994d39c0913a5196f271dd622b71e709f Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 28 Jun 2016 21:21:21 +0200 Subject: [PATCH] src: fix readability/braces cpplint warnings PR-URL: https://github.com/nodejs/node/pull/7462 Reviewed-By: Trevor Norris --- src/cares_wrap.cc | 4 ++-- src/node_http_parser.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 41b545468f55a8..ddb215715cb2c4 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -369,11 +369,11 @@ class QueryWrap : public AsyncWrap { // Subclasses should implement the appropriate Parse method. virtual void Parse(unsigned char* buf, int len) { UNREACHABLE(); - }; + } virtual void Parse(struct hostent* host) { UNREACHABLE(); - }; + } }; diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc index b094ce5f2fbac7..b12dd47706fe41 100644 --- a/src/node_http_parser.cc +++ b/src/node_http_parser.cc @@ -108,9 +108,9 @@ struct StringPtr { void Update(const char* str, size_t size) { - if (str_ == nullptr) + if (str_ == nullptr) { 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. // TODO(bnoordhuis) Use slab allocation, O(n) allocs is bad. char* s = new char[size_ + size];