[time-sync] remove reference operator in C API (#3833)

This commit is contained in:
Jonathan Hui
2019-05-20 08:50:43 -07:00
committed by GitHub
parent 8b544f000d
commit fa395d7205
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ typedef void (*otNetworkTimeSyncCallbackFn)(void *aCallbackContext);
* @returns The time synchronization status.
*
*/
otNetworkTimeStatus otNetworkTimeGet(otInstance *aInstance, uint64_t &aNetworkTime);
otNetworkTimeStatus otNetworkTimeGet(otInstance *aInstance, uint64_t *aNetworkTime);
/**
* Set the time synchronization period.
+1 -1
View File
@@ -1865,7 +1865,7 @@ void Interpreter::ProcessNetworkTime(int argc, char *argv[])
uint64_t time;
otNetworkTimeStatus networkTimeStatus;
networkTimeStatus = otNetworkTimeGet(mInstance, time);
networkTimeStatus = otNetworkTimeGet(mInstance, &time);
mServer->OutputFormat("Network Time: %luus", time);
+2 -2
View File
@@ -42,11 +42,11 @@
using namespace ot;
otNetworkTimeStatus otNetworkTimeGet(otInstance *aInstance, uint64_t &aNetworkTime)
otNetworkTimeStatus otNetworkTimeGet(otInstance *aInstance, uint64_t *aNetworkTime)
{
Instance &instance = *static_cast<Instance *>(aInstance);
return instance.Get<TimeSync>().GetTime(aNetworkTime);
return instance.Get<TimeSync>().GetTime(*aNetworkTime);
}
otError otNetworkTimeSetSyncPeriod(otInstance *aInstance, uint16_t aTimeSyncPeriod)
+1 -1
View File
@@ -3182,7 +3182,7 @@ template <> otError NcpBase::HandlePropertyGet<SPINEL_PROP_THREAD_NETWORK_TIME>(
otNetworkTimeStatus networkTimeStatus;
uint64_t time;
networkTimeStatus = otNetworkTimeGet(mInstance, time);
networkTimeStatus = otNetworkTimeGet(mInstance, &time);
SuccessOrExit(error = mEncoder.WriteUint64(time));
SuccessOrExit(error = mEncoder.WriteInt8((int8_t)networkTimeStatus));