mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 13:20:25 +00:00
[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:
committed by
GitHub
parent
7086ea0dad
commit
989727feae
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user