diff --git a/include/openthread/cli.h b/include/openthread/cli.h index 84606c2b5..e2b6f8b36 100644 --- a/include/openthread/cli.h +++ b/include/openthread/cli.h @@ -140,9 +140,9 @@ void otCliUartAppendResult(otError aError); * @param[in] aLogLevel The log level. * @param[in] aLogRegion The log region. * @param[in] aFormat A pointer to the format string. - * @param[in] ap va_list matching aFormat. + * @param[in] aArgs va_list matching aFormat. */ -void otCliPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list ap); +void otCliPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list aArgs); /** * @} diff --git a/include/openthread/diag.h b/include/openthread/diag.h index a59844dd8..844251aaf 100644 --- a/include/openthread/diag.h +++ b/include/openthread/diag.h @@ -62,13 +62,13 @@ void otDiagInit(otInstance *aInstance); /** * This function processes a factory diagnostics command line. * - * @param[in] argc The argument counter of diagnostics command line. - * @param[in] argv The argument vector of diagnostics command line. + * @param[in] aArgc The argument counter of diagnostics command line. + * @param[in] aArgv The argument vector of diagnostics command line. * * @returns A pointer to the output string. * */ -char *otDiagProcessCmd(int argc, char *argv[]); +char *otDiagProcessCmd(int aArgc, char *aArgv[]); /** * This function processes a factory diagnostics command line. diff --git a/include/openthread/icmp6.h b/include/openthread/icmp6.h index aed42dfc9..2d26d4ed0 100644 --- a/include/openthread/icmp6.h +++ b/include/openthread/icmp6.h @@ -166,8 +166,8 @@ otError otIcmp6RegisterHandler(otInstance *aInstance, otIcmp6Handler *aHandler); * May be zero. * */ -otError otIcmp6SendEchoRequest(otInstance *aInstance, otMessage *aMessage, - const otMessageInfo *aMessageInfo, uint16_t aIdentifier); +otError otIcmp6SendEchoRequest(otInstance *aInstance, otMessage *aMessage, const otMessageInfo *aMessageInfo, + uint16_t aIdentifier); /** * @} diff --git a/include/openthread/instance.h b/include/openthread/instance.h index 66c4e72c5..cea69da86 100644 --- a/include/openthread/instance.h +++ b/include/openthread/instance.h @@ -103,7 +103,8 @@ typedef void (OTCALL *otDeviceAvailabilityChangedCallback)(bool aAdded, const GU * */ OTAPI void OTCALL otSetDeviceAvailabilityChangedCallback(otApiInstance *aApiInstance, - otDeviceAvailabilityChangedCallback aCallback, void *aCallbackContext); + otDeviceAvailabilityChangedCallback aCallback, + void *aCallbackContext); /** * This function querys the list of OpenThread device contexts on the system. diff --git a/include/openthread/ip6.h b/include/openthread/ip6.h index 4cf739e14..6d47968eb 100644 --- a/include/openthread/ip6.h +++ b/include/openthread/ip6.h @@ -347,13 +347,13 @@ const uint16_t *otIp6GetUnsecurePorts(otInstance *aInstance, uint8_t *aNumEntrie /** * Test if two IPv6 addresses are the same. * - * @param[in] a A pointer to the first IPv6 address to compare. - * @param[in] b A pointer to the second IPv6 address to compare. + * @param[in] aFrist A pointer to the first IPv6 address to compare. + * @param[in] aSecond A pointer to the second IPv6 address to compare. * * @retval TRUE The two IPv6 addresses are the same. * @retval FALSE The two IPv6 addresses are not the same. */ -OTAPI bool OTCALL otIp6IsAddressEqual(const otIp6Address *a, const otIp6Address *b); +OTAPI bool OTCALL otIp6IsAddressEqual(const otIp6Address *aFirst, const otIp6Address *aSecond); /** * Convert a human-readable IPv6 address string into a binary representation. diff --git a/include/openthread/ncp.h b/include/openthread/ncp.h index 371a10801..bdad6d44b 100644 --- a/include/openthread/ncp.h +++ b/include/openthread/ncp.h @@ -208,9 +208,9 @@ void otNcpRegisterLegacyHandlers(const otNcpLegacyHandlers *aHandlers); * @param[in] aLogLevel The log level. * @param[in] aLogRegion The log region. * @param[in] aFormat A pointer to the format string. - * @param[in] ap va_list matching aFormat. + * @param[in] aArgs va_list matching aFormat. */ -void otNcpPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list ap); +void otNcpPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list aArgs); /** * @} diff --git a/src/cli/cli_uart.cpp b/src/cli/cli_uart.cpp index df51752dc..296c18984 100644 --- a/src/cli/cli_uart.cpp +++ b/src/cli/cli_uart.cpp @@ -294,14 +294,14 @@ void Uart::SendDoneTask(void) Send(); } -extern "C" void otCliPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list ap) +extern "C" void otCliPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list aArgs) { if (NULL == Uart::sUartServer) { return; } - Uart::sUartServer->OutputFormatV(aFormat, ap); + Uart::sUartServer->OutputFormatV(aFormat, aArgs); Uart::sUartServer->OutputFormat("\r\n"); OT_UNUSED_VARIABLE(aLogLevel); diff --git a/src/core/api/ip6_api.cpp b/src/core/api/ip6_api.cpp index 337e2451a..904384628 100644 --- a/src/core/api/ip6_api.cpp +++ b/src/core/api/ip6_api.cpp @@ -86,18 +86,19 @@ const otNetifAddress *otIp6GetUnicastAddresses(otInstance *aInstance) return instance.GetThreadNetif().GetUnicastAddresses(); } -otError otIp6AddUnicastAddress(otInstance *aInstance, const otNetifAddress *address) +otError otIp6AddUnicastAddress(otInstance *aInstance, const otNetifAddress *aAddress) { Instance &instance = *static_cast(aInstance); - return instance.GetThreadNetif().AddExternalUnicastAddress(*static_cast(address)); + return instance.GetThreadNetif().AddExternalUnicastAddress( + *static_cast(aAddress)); } -otError otIp6RemoveUnicastAddress(otInstance *aInstance, const otIp6Address *address) +otError otIp6RemoveUnicastAddress(otInstance *aInstance, const otIp6Address *aAddress) { Instance &instance = *static_cast(aInstance); - return instance.GetThreadNetif().RemoveExternalUnicastAddress(*static_cast(address)); + return instance.GetThreadNetif().RemoveExternalUnicastAddress(*static_cast(aAddress)); } const otNetifMulticastAddress *otIp6GetMulticastAddresses(otInstance *aInstance) @@ -233,14 +234,14 @@ const uint16_t *otIp6GetUnsecurePorts(otInstance *aInstance, uint8_t *aNumEntrie return instance.GetThreadNetif().GetIp6Filter().GetUnsecurePorts(*aNumEntries); } -bool otIp6IsAddressEqual(const otIp6Address *a, const otIp6Address *b) +bool otIp6IsAddressEqual(const otIp6Address *aFirst, const otIp6Address *aSecond) { - return *static_cast(a) == *static_cast(b); + return *static_cast(aFirst) == *static_cast(aSecond); } -otError otIp6AddressFromString(const char *str, otIp6Address *address) +otError otIp6AddressFromString(const char *aString, otIp6Address *aAddress) { - return static_cast(address)->FromString(str); + return static_cast(aAddress)->FromString(aString); } uint8_t otIp6PrefixMatch(const otIp6Address *aFirst, const otIp6Address *aSecond) diff --git a/src/diag/openthread-diag.cpp b/src/diag/openthread-diag.cpp index 2d8d9efbe..8033f2352 100644 --- a/src/diag/openthread-diag.cpp +++ b/src/diag/openthread-diag.cpp @@ -48,21 +48,21 @@ void otDiagInit(otInstance *aInstance) Diag::Init(aInstance); } -char *otDiagProcessCmd(int argc, char *argv[]) +char *otDiagProcessCmd(int aArgc, char *aArgv[]) { - return Diag::ProcessCmd(argc, argv); + return Diag::ProcessCmd(aArgc, aArgv); } -char *otDiagProcessCmdLine(char *string) +char *otDiagProcessCmdLine(char *aString) { char *argv[8]; int argc = 0; - int length = static_cast(strlen(string)); + int length = static_cast(strlen(aString)); char *cmd; - for (; *string == ' '; string++, length--); + for (; *aString == ' '; aString++, length--); - for (cmd = string + 1; (cmd < string + length) && (cmd != NULL); ++cmd) + for (cmd = aString + 1; (cmd < aString + length) && (cmd != NULL); ++cmd) { if (*cmd == ' ' || *cmd == '\r' || *cmd == '\n') { diff --git a/src/ncp/ncp_base.cpp b/src/ncp/ncp_base.cpp index 1a5b00e33..036e50850 100644 --- a/src/ncp/ncp_base.cpp +++ b/src/ncp/ncp_base.cpp @@ -2124,12 +2124,12 @@ otError otNcpStreamWrite(int aStreamId, const uint8_t *aDataPtr, int aDataLen) } -extern "C" void otNcpPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list ap) +extern "C" void otNcpPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list aArgs) { char logString[128]; int charsWritten; - if ((charsWritten = vsnprintf(logString, sizeof(logString), aFormat, ap)) > 0) + if ((charsWritten = vsnprintf(logString, sizeof(logString), aFormat, aArgs)) > 0) { if (charsWritten > static_cast(sizeof(logString) - 1)) {