Fix copyright lines
[folly.git] / folly / experimental / symbolizer / StackTrace.cpp
index dde71705f4fc2294bd658cc7da30a0ed9008ecd3..bca09b001721ab9813f8676102fd19a8aafd7275 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2014 Facebook, Inc.
+ * Copyright 2013-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-#include "folly/experimental/symbolizer/StackTrace.h"
+#include <folly/experimental/symbolizer/StackTrace.h>
 
 // Must be first to ensure that UNW_LOCAL_ONLY is defined
 #define UNW_LOCAL_ONLY 1
 #include <libunwind.h>
 
-namespace folly { namespace symbolizer {
+namespace folly {
+namespace symbolizer {
 
 ssize_t getStackTrace(uintptr_t* addresses, size_t maxAddresses) {
-  static_assert(sizeof(uintptr_t) == sizeof(void*),
-                "uinptr_t / pointer size mismatch");
+  static_assert(
+      sizeof(uintptr_t) == sizeof(void*), "uintptr_t / pointer size mismatch");
   // The libunwind documentation says that unw_backtrace is async-signal-safe
   // but, as of libunwind 1.0.1, it isn't (tdep_trace allocates memory on
   // x86_64)
@@ -48,7 +48,7 @@ inline bool getFrameInfo(unw_cursor_t* cursor, uintptr_t& ip) {
   ip = uip - (r == 0);
   return true;
 }
-}  // namespace
+} // namespace
 
 ssize_t getStackTraceSafe(uintptr_t* addresses, size_t maxAddresses) {
   if (maxAddresses == 0) {
@@ -66,7 +66,7 @@ ssize_t getStackTraceSafe(uintptr_t* addresses, size_t maxAddresses) {
     return -1;
   }
   ++addresses;
-  ssize_t count = 1;
+  size_t count = 1;
   for (; count != maxAddresses; ++count, ++addresses) {
     int r = unw_step(&cursor);
     if (r < 0) {
@@ -81,5 +81,5 @@ ssize_t getStackTraceSafe(uintptr_t* addresses, size_t maxAddresses) {
   }
   return count;
 }
-
-}}  // namespaces
+} // namespace symbolizer
+} // namespace folly