From 6047d320df6aceeddd16c116cb85be6c4a88e199 Mon Sep 17 00:00:00 2001 From: chen Date: Mon, 14 Mar 2022 10:36:51 +0800 Subject: [PATCH] modify code review Signed-off-by: chen Change-Id: Iba4cd26d7ee1710a31e7dc8c1f4f9d89ae4133e1 --- interfaces/kits/samgr/samgr_lite.h | 2 +- samgr_server/source/samgr_server.c | 2 +- samgr_server/source/samgr_server.h | 2 +- samgr_server/source/samgr_server_rpc.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/interfaces/kits/samgr/samgr_lite.h b/interfaces/kits/samgr/samgr_lite.h index 3b21a0e..e8e1718 100755 --- a/interfaces/kits/samgr/samgr_lite.h +++ b/interfaces/kits/samgr/samgr_lite.h @@ -249,7 +249,7 @@ typedef struct SamgrLite { IUnknown *(*GetFeatureApi)(const char *serviceName, const char *feature); /** - * @brief Adds system capablity. + * @brief Adds system capability. * * You can call this function to add the system capability. \n * diff --git a/samgr_server/source/samgr_server.c b/samgr_server/source/samgr_server.c index 18ef55d..51d65d3 100755 --- a/samgr_server/source/samgr_server.c +++ b/samgr_server/source/samgr_server.c @@ -150,7 +150,7 @@ static int32 Invoke(IServerProxy *iProxy, int funcId, void *origin, IpcIo *req, uint32_t resource = IpcIoPopUint32(req); uint32_t option = IpcIoPopUint32(req); if (server == NULL || resource >= RES_BUTT || g_functions[resource] == NULL) { - HILOG_ERROR(HILOG_MODULE_SAMGR, "Invalid Msg<%d, %d, %d>", resource, option, funcId); + HILOG_ERROR(HILOG_MODULE_SAMGR, "Invalid Msg<%d, %u, %d>", resource, option, funcId); return EC_INVALID; } return g_functions[resource](server, option, origin, req, reply); diff --git a/samgr_server/source/samgr_server.h b/samgr_server/source/samgr_server.h index ed53f5d..aa7150b 100755 --- a/samgr_server/source/samgr_server.h +++ b/samgr_server/source/samgr_server.h @@ -36,7 +36,7 @@ typedef struct SamgrProxy SamgrProxy; typedef struct SysCapImpl SysCapImpl; typedef enum MsgId { MSG_CLEAN, -}MsgId; +} MsgId; struct SamgrProxy { INHERIT_SERVER_IPROXY; }; diff --git a/samgr_server/source/samgr_server_rpc.c b/samgr_server/source/samgr_server_rpc.c index bbf1afe..68d2a80 100755 --- a/samgr_server/source/samgr_server_rpc.c +++ b/samgr_server/source/samgr_server_rpc.c @@ -543,7 +543,7 @@ void ProcGetAllSysCap(SamgrServer *server, IpcIo *req, IpcIo *reply) } int32 nextRequestIdx = startIdx; int32 replyNum = GetReplyNumAndNextReqIdx(sysCapablitys, startIdx, &nextRequestIdx); - HILOG_DEBUG(HILOG_MODULE_SAMGR, "ProcGetAllSysCap replyNum: %d, size: %d, startIdx: %d, nextRequestIdx: %d", + HILOG_DEBUG(HILOG_MODULE_SAMGR, "ProcGetAllSysCap replyNum: %d, size: %d, startIdx: %u, nextRequestIdx: %d", replyNum, size, startIdx, nextRequestIdx); WriteInt32(reply, EC_SUCCESS); // indicate is the last reply -- Gitee