Description:C90 Warning cleaning

Feature or Bugfix:Feature
Binary Source: No

Signed-off-by: kangweijie <kangweijie@huawei.com>
This commit is contained in:
kangweijie
2021-10-28 06:21:07 +00:00
parent 98c603d88e
commit 318469cabf
15 changed files with 70 additions and 70 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ extern "C" {
struct BusDev *HdfWlanCreateBusManager(const struct HdfConfigWlanBus *busConfig)
{
struct BusDev *bus = NULL;
struct BusDev *bus = NULL;
if (busConfig == NULL) {
return NULL;
}
@@ -48,10 +48,10 @@ static int32_t StartAp(struct NetDevice *netDev, WifiApSetting *apSettings)
{
struct WlanAPConf apConf = { 0 };
int32_t ret;
struct HdfChipDriver *chipDriver = NULL;
struct HdfChipDriver *chipDriver = NULL;
errno_t err;
HDF_LOGE("%s:starting ap...", __func__);
chipDriver = GetChipDriver(netDev);
HDF_LOGE("%s:starting ap...", __func__);
chipDriver = GetChipDriver(netDev);
if (chipDriver == NULL) {
HDF_LOGE("%s:bad net device found!", __func__);
return HDF_FAILURE;
+1 -1
View File
@@ -347,7 +347,7 @@ static int32_t WifiCmdSetScanningMacAddress(const RequestContext *context, struc
const char *ifName = NULL;
unsigned char *mac = NULL;
uint32_t replayDataSize;
struct HdfChipDriver *chipDriver = NULL;
struct HdfChipDriver *chipDriver = NULL;
(void)context;
if (reqData == NULL || rspData == NULL) {
return HDF_ERR_INVALID_PARAM;
+5 -8
View File
@@ -718,8 +718,7 @@ static int32_t WifiCmdSendAction(const RequestContext *context, struct HdfSBuf *
const char *ifName = NULL;
uint32_t dataSize = 0;
struct NetDevice *netdev = NULL;
int ret;
int ret;
(void)context;
(void)rspData;
if (reqData == NULL) {
@@ -979,8 +978,7 @@ static int32_t WifiCmdSetTxPower(const RequestContext *context, struct HdfSBuf *
static int32_t WifiCmdSetClient(const RequestContext *context, struct HdfSBuf *reqData, struct HdfSBuf *rspData)
{
uint32_t clientNum = 0;
struct HdfWifiEventToClientMap *eventToClientMap = NULL;
struct HdfWifiEventToClientMap *eventToClientMap = NULL;
(void)rspData;
if (reqData == NULL || context == NULL) {
return HDF_ERR_INVALID_PARAM;
@@ -1203,7 +1201,7 @@ void SendMessageResetDriverCallBack(const RequestContext *context, struct HdfSBu
ErrorCode rspCode)
{
uint8_t chipId;
int32_t ret;
int32_t ret;
const char *ifName = NULL;
(void)context;
@@ -1232,7 +1230,7 @@ void SendMessageResetDriverCallBack(const RequestContext *context, struct HdfSBu
static int32_t WifiCmdResetDriver(const RequestContext *context, struct HdfSBuf *reqData, struct HdfSBuf *rspData)
{
int32_t ret;
struct HdfSBuf *data = NULL;
struct HdfSBuf *data = NULL;
(void)context;
if (reqData == NULL || rspData == NULL) {
return HDF_ERR_INVALID_PARAM;
@@ -1495,8 +1493,7 @@ static int32_t WifiCmdRemoveIf(const RequestContext *context, struct HdfSBuf *re
struct NetDevice *netdev = NULL;
const char *ifName = NULL;
WifiIfRemove *ifRemove = NULL;
uint32_t dataSize;
uint32_t dataSize;
(void)context;
if (reqData == NULL || rspData == NULL) {
return HDF_ERR_INVALID_PARAM;
@@ -250,7 +250,7 @@ static int32_t ParseWlanPowerConfig(const struct DeviceResourceNode *node,
static int32_t ParseWlanPowersConfig(const struct DeviceResourceNode *node, struct HdfConfWlanPowers *powersConfig)
{
struct DeviceResourceIface *drsOps = NULL;
const struct DeviceResourceNode *fstPowerNode = NULL;
const struct DeviceResourceNode *fstPowerNode = NULL;
const struct DeviceResourceNode *secPowerNode = NULL;
if (node == NULL || powersConfig == NULL) {
HDF_LOGE("%s: at least one of the paras is NULL!", __func__);
@@ -261,7 +261,7 @@ static int32_t ParseWlanPowersConfig(const struct DeviceResourceNode *node, stru
HDF_LOGE("%s: at least one of the paras is NULL!", __func__);
return HDF_FAILURE;
}
fstPowerNode = drsOps->GetChildNode(node, "power0");
fstPowerNode = drsOps->GetChildNode(node, "power0");
if (fstPowerNode == NULL) {
HDF_LOGE("%s: get power0 config fail!", __func__);
return HDF_FAILURE;
@@ -142,7 +142,7 @@ int32_t HdfWlanPowerMgrRelease(struct PowerManager* powerMgr)
*/
struct PowerManager* HdfWlanCreatePowerManager(const struct HdfConfWlanPowers *configPowers)
{
struct PowerManagerImpl *powerMgrimpl = NULL;
struct PowerManagerImpl *powerMgrimpl = NULL;
if (configPowers == NULL) {
HDF_LOGE("%s: configPowers is NULL", __func__);
return NULL;
@@ -29,7 +29,7 @@ PriorityQueue *CreatePriorityQueue(uint16_t queueSize, uint8_t priorityLevelCoun
uint32_t queueMemSize;
PriorityQueueImpl *priorityQueue = NULL;
uint32_t ret = HDF_SUCCESS;
HDF_STATUS status;
HDF_STATUS status;
if (priorityLevelCount > MAX_PRIORITY_LEVEL || priorityLevelCount == 0) {
HDF_LOGE("%s:priorityLevelCount must in 1 to 8", __func__);
return NULL;
@@ -64,7 +64,7 @@ PriorityQueue *CreatePriorityQueue(uint16_t queueSize, uint8_t priorityLevelCoun
void DestroyPriorityQueue(PriorityQueue *queue)
{
uint8_t i;
HDF_STATUS status;
HDF_STATUS status;
PriorityQueueImpl *queueImpl = (PriorityQueueImpl *)queue;
if (queue == NULL) {
return;
@@ -45,7 +45,7 @@ struct WlanHwCapability *GetHwCapability(struct NetDevice *netDev)
{
struct HdfChipDriver *chipDriver = GetChipDriver(netDev);
struct WlanHwCapability *capability = NULL;
int32_t ret;
int32_t ret;
if (chipDriver == NULL) {
HDF_LOGE("%s:bad net device found!", __func__);
return NULL;
@@ -223,7 +223,7 @@ char *HdfWlanGetIfNames(const uint8_t chipId, uint8_t *ifNameCount)
char *ifNames = NULL;
uint32_t bufferSize;
uint8_t i, j;
int32_t ret;
int32_t ret;
if (ifNameCount == NULL) {
HDF_LOGE("%s: para is NULL", __func__);
return NULL;
@@ -61,7 +61,7 @@ void ReleaseMessageMapper(struct ServiceDef *mapper)
struct MessageDef *GetMsgDef(const struct ServiceDef *serviceDef, uint32_t commandId)
{
struct MessageDef *msgDef = NULL;
struct MessageDef *msgDef = NULL;
if (serviceDef == NULL || serviceDef->messages == NULL) {
HDF_LOGE("%s:input is NULL!", __func__);
return NULL;
@@ -104,7 +104,7 @@ ErrorCode AppendToLocalDispatcher(MessageDispatcher *dispatcher, const uint8_t p
void SetToResponse(MessageContext *context)
{
ServiceId senderId;
ServiceId senderId;
if (context->requestType != MESSAGE_TYPE_ASYNC_REQ && context->requestType != MESSAGE_TYPE_SYNC_REQ) {
HDF_LOGE("Only sync and async message can send response!type=%u", context->requestType);
return;
@@ -130,7 +130,7 @@ static void HandleAsyncResponse(MessageContext *context)
static void HandleSyncResponse(MessageContext *context)
{
HDF_STATUS status;
HDF_STATUS status;
if (context == NULL) {
HDF_LOGE("Input context is NULL!");
return;
@@ -232,7 +232,7 @@ static void ReleaseAllMessage(MessageDispatcher *dispatcher)
static int RunDispatcher(void *para)
{
MessageDispatcher *dispatcher = NULL;
MessageDispatcher *dispatcher = NULL;
MessageContext *context = NULL;
if (para == NULL) {
HDF_LOGE("Start dispatcher failed! cause:%s\n", "input para is NULL");
@@ -278,13 +278,13 @@ static int RunDispatcher(void *para)
static ErrorCode StartDispatcher(MessageDispatcher *dispatcher)
{
HDF_STATUS status;
HDF_STATUS status;
ErrorCode errCode;
LocalMessageDispatcher *localDispatcher = NULL;
if (dispatcher == NULL) {
return ME_ERROR_NULL_PTR;
}
status = OsalMutexTimedLock(&dispatcher->mutex, HDF_WAIT_FOREVER);
status = OsalMutexTimedLock(&dispatcher->mutex, HDF_WAIT_FOREVER);
if (status != HDF_SUCCESS) {
return ME_ERROR_OPER_MUTEX_FAILED;
}
@@ -335,11 +335,11 @@ static ErrorCode StartDispatcher(MessageDispatcher *dispatcher)
static void ShutdownDispatcher(MessageDispatcher *dispatcher)
{
HDF_STATUS status;
HDF_STATUS status;
if (dispatcher == NULL) {
return;
}
status = OsalMutexTimedLock(&dispatcher->mutex, HDF_WAIT_FOREVER);
status = OsalMutexTimedLock(&dispatcher->mutex, HDF_WAIT_FOREVER);
if (status != HDF_SUCCESS) {
HDF_LOGE("Get lock failed!status=%d", status);
return;
@@ -384,7 +384,7 @@ static void DestroyLocalDispatcher(MessageDispatcher *dispatcher)
ErrorCode CreateLocalDispatcher(MessageDispatcher **dispatcher, const DispatcherConfig *config)
{
LocalMessageDispatcher *localDispatcher = NULL;
LocalMessageDispatcher *localDispatcher = NULL;
int32_t ret;
ErrorCode errCode;
if (dispatcher == NULL || config == NULL) {
@@ -70,7 +70,7 @@ static void ReleaseRemoteService(RemoteService *service)
static MessageDispatcher *RefDispatcherInner(const DispatcherId dispatcherId, bool requireLock)
{
MessageDispatcher *result = NULL;
MessageDispatcher *result = NULL;
if (dispatcherId >= MESSAGE_ENGINE_MAX_DISPATCHER) {
HDF_LOGE("%s:Input ID is too big.input=%u", __func__, dispatcherId);
return NULL;
@@ -106,7 +106,7 @@ static MessageDispatcher *RefDispatcherInner(const DispatcherId dispatcherId, bo
static ErrorCode RegDispatcher(DispatcherId dispatcherId, MessageDispatcher *dispatcher)
{
HDF_STATUS status;
HDF_STATUS status;
ErrorCode errCode;
if (dispatcherId >= MESSAGE_ENGINE_MAX_DISPATCHER) {
HDF_LOGE("%s:dispatcher id is too big!id=%u", __func__, dispatcherId);
@@ -141,7 +141,7 @@ static ErrorCode RegDispatcher(DispatcherId dispatcherId, MessageDispatcher *dis
ErrorCode AddDispatcher(DispatcherConfig *config)
{
ErrorCode errCode;
ErrorCode errCode;
MessageDispatcher *dispatcher = NULL;
if (config == NULL) {
return ME_ERROR_NULL_PTR;
@@ -194,7 +194,7 @@ static void NotifyAllNodesServiceDel(const NodeId nodeId, ServiceId serviceId)
static ErrorCode NotifyAllNodesServiceAdd(const NodeId nodeId, struct ServiceDef *mapper)
{
uint8_t i;
uint8_t notifyNodeIndex;
uint8_t notifyNodeIndex;
ErrorCode errCode;
if (mapper == NULL) {
return ME_ERROR_NULL_PTR;
@@ -263,7 +263,7 @@ static ErrorCode DoRegistService(const NodeId nodeId, const DispatcherId dispatc
}
static ErrorCode RegistServiceInner(const NodeId nodeId, const DispatcherId dispatcherId, struct ServiceDef *mapper)
{
HDF_STATUS status;
HDF_STATUS status;
MessageNode *node = NULL;
RemoteService *remoteService = NULL;
MessageDispatcher *dispatcher = NULL;
@@ -288,7 +288,7 @@ static ErrorCode RegistServiceInner(const NodeId nodeId, const DispatcherId disp
OsalMutexUnlock(&g_routerMutex);
return ME_ERROR_NO_SUCH_NODE;
}
do {
do {
if (node->CreateRemoteService == NULL) {
HDF_LOGE("%s:Can not reg service to node %d", __func__, nodeId);
errCode = ME_ERROR_NOT_SUPPORTED;
@@ -343,7 +343,7 @@ ErrorCode RegistLocalService(const DispatcherId dispatcherId, struct ServiceDef
ErrorCode RegistRemoteService(NodeId nodeId, RemoteService *service)
{
HDF_STATUS status;
HDF_STATUS status;
ErrorCode errCode;
if (service == NULL) {
return ME_ERROR_NULL_PTR;
@@ -375,7 +375,7 @@ ErrorCode RegistRemoteService(NodeId nodeId, RemoteService *service)
}
static ErrorCode UnregistServiceInner(const NodeId nodeId, const DispatcherId dispatcherId, const ServiceId serviceId)
{
RemoteService *service = NULL;
RemoteService *service = NULL;
HDF_STATUS status;
ErrorCode errCode;
if (serviceId >= MESSAGE_ENGINE_MAX_SERVICE) {
@@ -449,7 +449,7 @@ static bool CheckServiceID(ServiceId serviceId, bool allowSync)
RemoteService *RefRemoteService(ServiceId serviceId)
{
HDF_STATUS status;
HDF_STATUS status;
RemoteService *remoteService = NULL;
RemoteService *service = NULL;
if (serviceId >= MESSAGE_ENGINE_MAX_SERVICE) {
@@ -481,8 +481,8 @@ RemoteService *RefRemoteService(ServiceId serviceId)
ErrorCode SendMessage(MessageContext *context)
{
RemoteService *service = NULL;
ErrorCode errCode;
RemoteService *service = NULL;
ErrorCode errCode;
service = RefRemoteService(context->receiverId);
if (service == NULL) {
return ME_ERROR_NO_SUCH_SERVICE;
@@ -565,7 +565,7 @@ static void ReleaseNodes(void)
static ErrorCode DoStartMessageRouter(uint8_t nodesConfig)
{
uint8_t i;
ErrorCode errCode;
ErrorCode errCode;
if (g_routerStatus != ME_STATUS_STOPPED) {
HDF_LOGE("Router have already started!");
return ME_ERROR_MUTI_INIT_NOT_ALLOWED;
@@ -607,7 +607,7 @@ static ErrorCode DoStartMessageRouter(uint8_t nodesConfig)
ErrorCode EnableDefaultDispatcher(void)
{
ErrorCode errCode;
ErrorCode errCode;
DispatcherConfig config = {
.dispatcherId = DEFAULT_DISPATCHER_ID,
.queueSize = DEFAULT_DISPATCHER_QUEUE_SIZE,
@@ -623,7 +623,7 @@ ErrorCode EnableDefaultDispatcher(void)
ErrorCode StartMessageRouter(uint8_t nodesConfig)
{
HDF_STATUS status;
HDF_STATUS status;
ErrorCode errCode;
if (g_routerMutex.realMutex == NULL) {
HDF_STATUS status = OsalMutexInit(&g_routerMutex);
@@ -647,7 +647,7 @@ ErrorCode StartMessageRouter(uint8_t nodesConfig)
static ErrorCode DoShutdownMessageRouter(void)
{
uint8_t i;
RemoteService *service = NULL;
RemoteService *service = NULL;
if (g_routerStatus == ME_STATUS_STOPPED) {
return ME_SUCCESS;
}
@@ -683,7 +683,7 @@ static ErrorCode DoShutdownMessageRouter(void)
ErrorCode ShutdownMessageRouter()
{
HDF_LOGW("%s:Shutdown router...", __func__);
HDF_STATUS status;
HDF_STATUS status;
ErrorCode errCode;
status = OsalMutexTimedLock(&g_routerMutex, HDF_WAIT_FOREVER);
if (status != HDF_SUCCESS) {
@@ -703,7 +703,7 @@ ErrorCode ShutdownMessageRouter()
MessageNode *RefMessageNode(const NodeId nodeId, bool isRequireLock)
{
MessageNode *node = NULL;
MessageNode *node = NULL;
HDF_STATUS status;
if (nodeId >= MAX_NODE_COUNT) {
HDF_LOGE("Input nodeId >= MAX_NODE_COUNT");
@@ -31,7 +31,7 @@ typedef struct LocalNodeService {
static void HandleRequestMessage(const RemoteService *service, MessageContext *context)
{
LocalNodeService *localNodeService = NULL;
LocalNodeService *localNodeService = NULL;
localNodeService = (LocalNodeService *)service;
struct MessageDef messageDef = { NULL, 0 };
if (context == NULL || service == NULL) {
@@ -51,7 +51,7 @@ static void HandleRequestMessage(const RemoteService *service, MessageContext *c
static void HandleResponseMessage(const RemoteService *service, MessageContext *context)
{
(void)service;
HDF_STATUS status;
HDF_STATUS status;
if (context->requestType < MESSAGE_RSP_START) {
return;
}
@@ -74,6 +74,7 @@ static void HandleResponseMessage(const RemoteService *service, MessageContext *
ErrorCode SendMessageLocalNode(const RemoteService *service, MessageContext *context)
{
LocalNodeService *localService = NULL;
uint8_t pri = HIGHEST_PRIORITY;
if (service == NULL || context == NULL) {
HDF_LOGE("%s:Input is NULL!", __func__);
@@ -88,7 +89,7 @@ ErrorCode SendMessageLocalNode(const RemoteService *service, MessageContext *con
(void)OsalSemPost(&context->rspSemaphore);
return ME_SUCCESS;
} else {
LocalNodeService *localService = (LocalNodeService *)service;
localService = (LocalNodeService *)service;
if (localService->dispatcher == NULL || localService->dispatcher->AppendMessage == NULL) {
HDF_LOGE("This service has no dispatcher!");
return ME_ERROR_NOT_SUPPORTED;
@@ -118,7 +119,7 @@ static void ShutdownLocalService(RemoteService *service)
static void DestroyLocalNodeRemoteService(RemoteService *service)
{
LocalNodeService *localService = NULL;
LocalNodeService *localService = NULL;
if (service == NULL) {
return;
}
@@ -133,7 +134,7 @@ static void DestroyLocalNodeRemoteService(RemoteService *service)
RemoteService *CreateLocalNodeService(MessageNode *node, MessageDispatcher *dispatcher, struct ServiceDef *mapper)
{
LocalNodeService *service = NULL;
LocalNodeService *service = NULL;
(void)node;
ErrorCode errCode;
if (mapper == NULL) {
@@ -143,7 +144,7 @@ RemoteService *CreateLocalNodeService(MessageNode *node, MessageDispatcher *disp
HDF_LOGE("%s:Bad dispatcher found!", __func__);
return NULL;
}
service = (LocalNodeService *)OsalMemCalloc(sizeof(LocalNodeService));
service = (LocalNodeService *)OsalMemCalloc(sizeof(LocalNodeService));
if (service == NULL) {
return NULL;
}
@@ -177,7 +178,7 @@ RemoteService *CreateLocalNodeService(MessageNode *node, MessageDispatcher *disp
static ErrorCode InitLocalNode(MessageNode *node)
{
HDF_STATUS status;
HDF_STATUS status;
ErrorCode errCode;
if (node == NULL) {
return ME_ERROR_NULL_PTR;
@@ -187,7 +188,7 @@ static ErrorCode InitLocalNode(MessageNode *node)
if (status != HDF_SUCCESS) {
return ME_ERROR_OPER_MUTEX_FAILED;
}
errCode = ME_SUCCESS;
errCode = ME_SUCCESS;
do {
if (node->status != ME_STATUS_STOPPED) {
HDF_LOGE("%s:unexpected status %d", __func__, node->status);
@@ -226,7 +227,7 @@ static ErrorCode InitLocalNode(MessageNode *node)
static void DestroyLocalNode(MessageNode *node)
{
int32_t ret;
int32_t ret;
if (node == NULL) {
return;
}
@@ -239,7 +240,7 @@ static void DestroyLocalNode(MessageNode *node)
ErrorCode CreateLocalNode(MessageNode **node)
{
int32_t ret;
int32_t ret;
LocalMessageNode *newNode = NULL;
ErrorCode errCode;
if (node == NULL) {
@@ -26,7 +26,7 @@ typedef struct {
static ErrorCode MessageInputCheck(const Service *sideCar, ServiceId receiver, struct HdfSBuf *sendData)
{
SideCarPrivateData *privateData = NULL;
SideCarPrivateData *privateData = NULL;
if (sideCar == NULL || sideCar->privateData == NULL) {
HDF_LOGE("%s:sideCar or sideCar.privateData is NULL", __func__);
return ME_ERROR_NULL_PTR;
@@ -75,7 +75,7 @@ int32_t DispatchToMessage(struct HdfDeviceIoClient *client, int id, struct HdfSB
ServiceId serviceId = GetServiceID(id);
uint32_t cmd = GetCmd(id);
MessageContext *context = NULL;
RemoteService *targetService = NULL;
RemoteService *targetService = NULL;
if (client == NULL) {
return HDF_ERR_INVALID_PARAM;
@@ -110,7 +110,7 @@ int32_t DispatchToMessage(struct HdfDeviceIoClient *client, int id, struct HdfSB
static ErrorCode SideCarSendSyncMessage(const Service *sideCar, ServiceId receiver, uint32_t commandId,
struct HdfSBuf *sendData, struct HdfSBuf *recvData)
{
SideCarPrivateData *privateData = NULL;
SideCarPrivateData *privateData = NULL;
MessageContext *context = NULL;
RemoteService *targetService = NULL;
ErrorCode errCode = MessageInputCheck(sideCar, receiver, sendData);
@@ -144,7 +144,7 @@ static ErrorCode SideCarSendSyncMessage(const Service *sideCar, ServiceId receiv
static ErrorCode SideCarSendAsyncMessageInner(const Service *sideCar, ServiceId receiver, uint32_t commandId,
struct HdfSBuf *reqData, MessageCallBack callback)
{
SideCarPrivateData *privateData = NULL;
SideCarPrivateData *privateData = NULL;
MessageContext *context = NULL;
struct HdfSBuf *rspData = NULL;
RemoteService *targetService = NULL;
@@ -204,7 +204,7 @@ static ErrorCode SideCarSendOneWayMessage(const struct SideCar_ *sideCar, Servic
static ErrorCode DestroyService(Service *service)
{
SideCarPrivateData *data = NULL;
SideCarPrivateData *data = NULL;
ErrorCode errCode;
if (service == NULL) {
return ME_ERROR_NULL_PTR;
@@ -216,7 +216,7 @@ static ErrorCode DestroyService(Service *service)
}
data = (SideCarPrivateData *)service->privateData;
HDF_LOGE("Destroy service! id=%d", data->serviceId);
errCode = UnregistLocalService(data->dispatcherId, data->serviceId);
errCode = UnregistLocalService(data->dispatcherId, data->serviceId);
if (errCode != ME_SUCCESS) {
HDF_LOGE("Unregist service failed!ret=%d", errCode);
return errCode;
@@ -230,7 +230,7 @@ static ErrorCode DestroyService(Service *service)
Service *InitService(struct ServiceDef *def, const ServiceCfg *cfg)
{
Service *service = NULL;
Service *service = NULL;
SideCarPrivateData *privateData = NULL;
ErrorCode errCode;
if (cfg == NULL || def == NULL) {
@@ -171,7 +171,7 @@ static void DestroyTask(struct FlowControlModule *fcm, FlowDir dir)
int32_t CreateFlowControlTask(struct FlowControlModule *fcm)
{
int32_t ret;
int32_t ret;
struct OsalThreadParam config = {
.priority = OSAL_THREAD_PRI_HIGHEST,
.stackSize = 0,
@@ -181,7 +181,7 @@ int32_t CreateFlowControlTask(struct FlowControlModule *fcm)
HDF_LOGE("%s fail: fcm = null!", __func__);
return HDF_ERR_INVALID_PARAM;
}
ret = CreateTask(&fcm->txTransferThread, RX_THREAD_NAME, RunWiFiTxFlowControl, &config, fcm);
ret = CreateTask(&fcm->txTransferThread, RX_THREAD_NAME, RunWiFiTxFlowControl, &config, fcm);
if (ret == HDF_FAILURE) {
fcm->threadStatus[FLOW_TX] = THREAD_INIT_FAIL;
return HDF_FAILURE;
@@ -27,7 +27,7 @@ int32_t MessageQueueTest001(void)
int c = 3;
int d = 4;
int32_t errCode;
void *p = NULL;
void *p = NULL;
PriorityQueue *queue = CreatePriorityQueue(TEST_QUEUE_SIZE, NO_PRIORITY);
if (queue == NULL) {
HDF_LOGE("%s:Create queue failed!", __func__);
@@ -76,7 +76,7 @@ int32_t MessageQueueTest002(void)
int c = 3;
int d = 4;
int32_t errCode;
void *p = NULL;
void *p = NULL;
PriorityQueue *queue = NULL;
queue = CreatePriorityQueue(TEST_QUEUE_SIZE, MUTI_PRIORITY);
if (queue == NULL) {
@@ -133,8 +133,9 @@ static int RunPushQueue(void *para)
int32_t MessageQueueTest003(void)
{
int32_t errCode = HDF_SUCCESS;
void *p = NULL;
void *p = NULL;
PriorityQueue *queue = NULL;
int32_t status;
queue = CreatePriorityQueue(TEST_QUEUE_SIZE, NO_PRIORITY);
if (queue == NULL) {
HDF_LOGE("%s:Create queue failed!", __func__);
@@ -148,7 +149,7 @@ int32_t MessageQueueTest003(void)
.stackSize = 0x1000,
};
int32_t status = OsalThreadCreate(&pushThread, RunPushQueue, queue);
status = OsalThreadCreate(&pushThread, RunPushQueue, queue);
if (status != HDF_SUCCESS) {
HDF_LOGE("%s:OsalThreadCreate failed!status=%d", __func__, status);
errCode = HDF_FAILURE;
@@ -76,12 +76,13 @@ static int32_t WiFiModuleTestSetEnv(void)
int32_t WiFiModuleTestCreateModule(void)
{
int32_t ret;
struct WifiModule *module = NULL;
ret = WiFiModuleTestSetEnv();
if (ret != HDF_SUCCESS) {
HDF_LOGE("%s:WiFiModuleTestSetEnv failed.ret=%d", __func__, ret);
return ret;
}
struct WifiModule *module = OsalMemCalloc(sizeof(struct WifiModule));
module = OsalMemCalloc(sizeof(struct WifiModule));
if (module == NULL) {
HDF_LOGE("%s fail WifiModuleCreate FAIL ", __func__);
return HDF_FAILURE;