Return if we handle any error messages to avoid unnecessarily calling recv/send
[folly.git] / folly / Demangle.cpp
index 4018719007a26bcce90527c23580c949e0d44e9e..d1f53cfc89c33e6bf565f0b3f0b0c2c16bdf4aab 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <folly/Demangle.h>
 
 #include <algorithm>
-#include <string.h>
+#include <cstring>
 
-#include <folly/Malloc.h>
+#include <folly/memory/Malloc.h>
 #include <folly/portability/Config.h>
 
 #if FOLLY_HAVE_CPLUS_DEMANGLE_V3_CALLBACK
-# include <cxxabi.h>
+#include <cxxabi.h>
 
 // From libiberty
 //
@@ -102,7 +102,7 @@ void demangleCallback(const char* str, size_t size, void* p) {
   buf->total += size;
 }
 
-}  // namespace
+} // namespace
 
 size_t demangle(const char* name, char* out, size_t outSize) {
 #ifdef FOLLY_DEMANGLE_MAX_SYMBOL_SIZE
@@ -159,4 +159,4 @@ size_t strlcpy(char* dest, const char* const src, size_t size) {
   return len;
 }
 
-} // folly
+} // namespace folly