From 9169632e685b02c47cd896d603a1b34d39098e62 Mon Sep 17 00:00:00 2001 From: jwx1282937 Date: Mon, 6 Nov 2023 02:30:45 +0000 Subject: [PATCH] fix: initizlize ret = -1 Signed-off-by: jwx1282937 --- services/dbinder/c/src/dbinder_stub.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/dbinder/c/src/dbinder_stub.c b/services/dbinder/c/src/dbinder_stub.c index fbb022da..8b55f37d 100644 --- a/services/dbinder/c/src/dbinder_stub.c +++ b/services/dbinder/c/src/dbinder_stub.c @@ -102,7 +102,7 @@ static int32_t ProcessProto(uint32_t code, IpcIo *data, IpcIo *reply, MessageOpt static int32_t DBinderRemoteRequest(uint32_t code, IpcIo *data, IpcIo *reply, MessageOption *option) { - int32_t ret; + int32_t ret = -1; switch (code) { case GET_PROTO_INFO: { ret = ProcessProto(code, data, reply, option); @@ -110,7 +110,6 @@ static int32_t DBinderRemoteRequest(uint32_t code, IpcIo *data, IpcIo *reply, Me } default: { RPC_LOG_ERROR("unknown dbinder code %u", code); - ret = -1; break; } }