[core] use kNullChar constant instead of '\0' literal (#12018)

This change replaces all instances of the null character literal
'\0' with the `kNullChar` constant throughout the `src/core/` files.
This improves code readability and consistency, making the intent
of the code more explicit.
This commit is contained in:
Abtin Keshavarzian
2025-10-10 12:55:04 -07:00
committed by GitHub
parent 7086ea0dad
commit 989727feae
15 changed files with 20 additions and 25 deletions
+1 -1
View File
@@ -209,7 +209,7 @@ otError otThreadSetNetworkName(otInstance *aInstance, const char *aNetworkName)
#if !OPENTHREAD_CONFIG_ALLOW_EMPTY_NETWORK_NAME
// Thread interfaces support a zero length name internally for backwards compatibility, but new names
// must be at least one valid character long.
VerifyOrExit(nullptr != aNetworkName && aNetworkName[0] != '\0', error = kErrorInvalidArgs);
VerifyOrExit(nullptr != aNetworkName && aNetworkName[0] != kNullChar, error = kErrorInvalidArgs);
#endif
error = AsCoreType(aInstance).Get<MeshCoP::NetworkNameManager>().SetNetworkName(aNetworkName);