1717// a pointer to a malloc'd string in *sptr.
1818// If return >= 0, use free to delete *sptr.
1919int __libcpp_vasprintf (char ** sptr, const char * __restrict format, va_list ap) {
20- *sptr = NULL ;
20+ *sptr = nullptr ;
2121 // Query the count required.
2222 va_list ap_copy;
2323 va_copy (ap_copy, ap);
2424 _LIBCPP_DIAGNOSTIC_PUSH
2525 _LIBCPP_CLANG_DIAGNOSTIC_IGNORED (" -Wformat-nonliteral" )
26- int count = vsnprintf (NULL , 0 , format, ap_copy);
26+ int count = vsnprintf (nullptr , 0 , format, ap_copy);
2727 _LIBCPP_DIAGNOSTIC_POP
2828 va_end (ap_copy);
2929 if (count < 0 )
@@ -81,7 +81,7 @@ size_t mbsnrtowcs(wchar_t* __restrict dst,
8181 // if result > 0, it's the size in bytes of that character.
8282 // othewise if result is zero it indicates the null character has been found.
8383 // otherwise it's an error and errno may be set.
84- size_t char_size = mbrtowc (dst ? dst + dest_converted : NULL , *src + source_converted, source_remaining, ps);
84+ size_t char_size = mbrtowc (dst ? dst + dest_converted : nullptr , *src + source_converted, source_remaining, ps);
8585 // Don't do anything to change errno from here on.
8686 if (char_size > 0 ) {
8787 source_remaining -= char_size;
@@ -95,7 +95,7 @@ size_t mbsnrtowcs(wchar_t* __restrict dst,
9595 }
9696 if (dst) {
9797 if (have_result && result == terminated_sequence)
98- *src = NULL ;
98+ *src = nullptr ;
9999 else
100100 *src += source_converted;
101101 }
@@ -141,7 +141,7 @@ size_t wcsnrtombs(char* __restrict dst,
141141 if (dst)
142142 result = wcrtomb_s (&char_size, dst + dest_converted, dest_remaining, c, ps);
143143 else
144- result = wcrtomb_s (&char_size, NULL , 0 , c, ps);
144+ result = wcrtomb_s (&char_size, nullptr , 0 , c, ps);
145145 // If result is zero there is no error and char_size contains the
146146 // size of the multi-byte-sequence converted.
147147 // Otherwise result indicates an errno type error.
@@ -161,7 +161,7 @@ size_t wcsnrtombs(char* __restrict dst,
161161 }
162162 if (dst) {
163163 if (terminator_found)
164- *src = NULL ;
164+ *src = nullptr ;
165165 else
166166 *src = *src + source_converted;
167167 }
0 commit comments