s/master/main/

Test: treehugger
Change-Id: I2c975b2f5f92f23c7357b6f7e785578504298cc6
diff --git a/libc/include/android/api-level.h b/libc/include/android/api-level.h
index 6602e5d..77ec653 100644
--- a/libc/include/android/api-level.h
+++ b/libc/include/android/api-level.h
@@ -40,7 +40,7 @@
  * @brief Functions and constants for dealing with multiple API levels.
  *
  * See
- * https://android.googlesource.com/platform/bionic/+/master/docs/defines.md.
+ * https://android.googlesource.com/platform/bionic/+/main/docs/defines.md.
  */
 
 #include <sys/cdefs.h>
@@ -50,7 +50,7 @@
 /**
  * Magic version number for an Android OS build which has not yet turned
  * into an official release, for comparison against `__ANDROID_API__`. See
- * https://android.googlesource.com/platform/bionic/+/master/docs/defines.md.
+ * https://android.googlesource.com/platform/bionic/+/main/docs/defines.md.
  */
 #define __ANDROID_API_FUTURE__ 10000
 
@@ -91,7 +91,7 @@
  *
  * See android_get_device_api_level(),
  * android_get_application_target_sdk_version() and
- * https://android.googlesource.com/platform/bionic/+/master/docs/defines.md.
+ * https://android.googlesource.com/platform/bionic/+/main/docs/defines.md.
  */
 #define __ANDROID_API__ __ANDROID_API_FUTURE__
 #endif
diff --git a/libc/include/malloc.h b/libc/include/malloc.h
index 6f992d9..d22b85c 100644
--- a/libc/include/malloc.h
+++ b/libc/include/malloc.h
@@ -361,7 +361,7 @@
  *
  * Available since API level 28.
  *
- * See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/master/libc/malloc_hooks/README.md)
+ * See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/main/libc/malloc_hooks/README.md)
  */
 extern void* _Nonnull (*volatile _Nonnull __malloc_hook)(size_t __byte_count, const void* _Nonnull __caller) __INTRODUCED_IN(28);
 
@@ -372,7 +372,7 @@
  *
  * Available since API level 28.
  *
- * See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/master/libc/malloc_hooks/README.md)
+ * See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/main/libc/malloc_hooks/README.md)
  */
 extern void* _Nonnull (*volatile _Nonnull __realloc_hook)(void* _Nullable __ptr, size_t __byte_count, const void* _Nonnull __caller) __INTRODUCED_IN(28);
 
@@ -383,7 +383,7 @@
  *
  * Available since API level 28.
  *
- * See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/master/libc/malloc_hooks/README.md)
+ * See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/main/libc/malloc_hooks/README.md)
  */
 extern void (*volatile _Nonnull __free_hook)(void* _Nullable __ptr, const void* _Nonnull __caller) __INTRODUCED_IN(28);
 
@@ -394,7 +394,7 @@
  *
  * Available since API level 28.
  *
- * See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/master/libc/malloc_hooks/README.md)
+ * See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/main/libc/malloc_hooks/README.md)
  */
 extern void* _Nonnull (*volatile _Nonnull __memalign_hook)(size_t __alignment, size_t __byte_count, const void* _Nonnull __caller) __INTRODUCED_IN(28);
 
diff --git a/libc/include/stdio.h b/libc/include/stdio.h
index 2fc5b21..312b356 100644
--- a/libc/include/stdio.h
+++ b/libc/include/stdio.h
@@ -203,7 +203,7 @@
 int fseek(FILE* _Nonnull __fp, long __offset, int __whence);
 long ftell(FILE* _Nonnull __fp);
 
-/* See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md */
+/* See https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md */
 #if defined(__USE_FILE_OFFSET64)
 int fgetpos(FILE* _Nonnull __fp, fpos_t* _Nonnull __pos) __RENAME(fgetpos64) __INTRODUCED_IN(24);
 int fsetpos(FILE* _Nonnull __fp, const fpos_t* _Nonnull __pos) __RENAME(fsetpos64) __INTRODUCED_IN(24);
diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h
index 4154e62..a8fb624 100644
--- a/libc/include/sys/cdefs.h
+++ b/libc/include/sys/cdefs.h
@@ -38,7 +38,7 @@
 
 /**
  * `__BIONIC__` is always defined if you're building with bionic. See
- * https://android.googlesource.com/platform/bionic/+/master/docs/defines.md.
+ * https://android.googlesource.com/platform/bionic/+/main/docs/defines.md.
  */
 #define __BIONIC__ 1
 
@@ -187,7 +187,7 @@
 
 /*
  * _FILE_OFFSET_BITS 64 support.
- * See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md
+ * See https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md
  */
 #if !defined(__LP64__) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
 #  define __USE_FILE_OFFSET64 1
diff --git a/libc/include/sys/mman.h b/libc/include/sys/mman.h
index f32ae61..823c9ba 100644
--- a/libc/include/sys/mman.h
+++ b/libc/include/sys/mman.h
@@ -58,7 +58,7 @@
 /**
  * mmap64() is a variant of mmap() that takes a 64-bit offset even on LP32.
  *
- * See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md
+ * See https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md
  */
 void* _Nonnull mmap64(void* _Nullable __addr, size_t __size, int __prot, int __flags, int __fd, off64_t __offset);
 
diff --git a/libc/include/sys/sendfile.h b/libc/include/sys/sendfile.h
index a72091d..26522a6 100644
--- a/libc/include/sys/sendfile.h
+++ b/libc/include/sys/sendfile.h
@@ -38,7 +38,7 @@
 
 __BEGIN_DECLS
 
-/* See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md */
+/* See https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md */
 #if defined(__USE_FILE_OFFSET64)
 ssize_t sendfile(int __out_fd, int __in_fd, off_t* _Nullable __offset, size_t __count) __RENAME(sendfile64);
 #else
diff --git a/libc/include/sys/types.h b/libc/include/sys/types.h
index f07c8fd..4622a4e 100644
--- a/libc/include/sys/types.h
+++ b/libc/include/sys/types.h
@@ -96,7 +96,7 @@
 typedef __time_t time_t;
 
 /* This historical accident means that we had a 32-bit off_t on 32-bit architectures. */
-/* See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md */
+/* See https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md */
 #if defined(__USE_FILE_OFFSET64) || defined(__LP64__)
 typedef int64_t off_t;
 typedef off_t loff_t;
diff --git a/libc/include/unistd.h b/libc/include/unistd.h
index dcad630..c8cceb2 100644
--- a/libc/include/unistd.h
+++ b/libc/include/unistd.h
@@ -265,7 +265,7 @@
 int fsync(int __fd);
 int fdatasync(int __fd);
 
-/* See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md */
+/* See https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md */
 #if defined(__USE_FILE_OFFSET64)
 int truncate(const char* _Nonnull __path, off_t __length) __RENAME(truncate64);
 off_t lseek(int __fd, off_t __offset, int __whence) __RENAME(lseek64);
diff --git a/libc/malloc_debug/Config.cpp b/libc/malloc_debug/Config.cpp
index be577bc..77d2f02 100644
--- a/libc/malloc_debug/Config.cpp
+++ b/libc/malloc_debug/Config.cpp
@@ -409,7 +409,8 @@
 
 void Config::LogUsage() const {
   error_log("For malloc debug option descriptions go to:");
-  error_log("  https://android.googlesource.com/platform/bionic/+/master/libc/malloc_debug/README.md");
+  error_log(
+      "  https://android.googlesource.com/platform/bionic/+/main/libc/malloc_debug/README.md");
 }
 
 bool Config::GetOption(const char** options_str, std::string* option, std::string* value) {
diff --git a/libc/malloc_debug/README.md b/libc/malloc_debug/README.md
index fddc4a3..37fafa7 100644
--- a/libc/malloc_debug/README.md
+++ b/libc/malloc_debug/README.md
@@ -170,7 +170,7 @@
 overrides this option, and should not be used at the same time.
 
 This option can also be used in combination with other tools such
-as [libmemunreachable](https://android.googlesource.com/platform/system/memory/libmemunreachable/+/master/README.md)
+as [libmemunreachable](https://android.googlesource.com/platform/system/memory/libmemunreachable/+/main/README.md)
 to only get backtraces for sizes of allocations listed as being leaked.
 
 ### backtrace\_max\_size=ALLOCATION\_SIZE\_BYTES
@@ -183,7 +183,7 @@
 overrides this option, and should not be used at the same time.
 
 This option can also be used in combination with other tools such
-as [libmemunreachable](https://android.googlesource.com/platform/system/memory/libmemunreachable/+/master/README.md)
+as [libmemunreachable](https://android.googlesource.com/platform/system/memory/libmemunreachable/+/main/README.md)
 to only get backtraces for sizes of allocations listed as being leaked.
 
 ### backtrace\_size=ALLOCATION\_SIZE\_BYTES
@@ -192,7 +192,7 @@
 This option overrides the backtrace\_min\_size and the backtrace\_max\_size.
 
 This option can also be used in combination with other tools such
-as [libmemunreachable](https://android.googlesource.com/platform/system/memory/libmemunreachable/+/master/README.md)
+as [libmemunreachable](https://android.googlesource.com/platform/system/memory/libmemunreachable/+/main/README.md)
 to only get backtraces for sizes of allocations listed as being leaked.
 
 ### backtrace\_full
diff --git a/libc/malloc_debug/tests/malloc_debug_config_tests.cpp b/libc/malloc_debug/tests/malloc_debug_config_tests.cpp
index bc7af6d..a911e76 100644
--- a/libc/malloc_debug/tests/malloc_debug_config_tests.cpp
+++ b/libc/malloc_debug/tests/malloc_debug_config_tests.cpp
@@ -40,8 +40,9 @@
 };
 
 std::string usage_string(
-  "6 malloc_debug For malloc debug option descriptions go to:\n"
-  "6 malloc_debug   https://android.googlesource.com/platform/bionic/+/master/libc/malloc_debug/README.md\n");
+    "6 malloc_debug For malloc debug option descriptions go to:\n"
+    "6 malloc_debug   "
+    "https://android.googlesource.com/platform/bionic/+/main/libc/malloc_debug/README.md\n");
 
 TEST_F(MallocDebugConfigTest, unknown_option) {