Nullability check for getopt module.
Bugs: b/245972273
Test: adb shell
Change-Id: I243bb87fe26beecd376d894b25cedd993c246880
diff --git a/libc/include/bits/getopt.h b/libc/include/bits/getopt.h
index 0411716..60a89ed 100644
--- a/libc/include/bits/getopt.h
+++ b/libc/include/bits/getopt.h
@@ -38,12 +38,12 @@
* Returns the next option character on success, returns -1 if all options have been parsed, and
* returns `'?'` on error.
*/
-int getopt(int __argc, char* const __argv[], const char* __options);
+int getopt(int __argc, char* const _Nonnull __argv[_Nullable], const char* _Nonnull __options);
/**
* Points to the text of the corresponding value for options that take an argument.
*/
-extern char* optarg;
+extern char* _Nullable optarg;
/**
* The index of the next element to be processed.