netutils/rexec: initialize ret to avoid maybe-uninitialized

When the relay loop exits early without entering any branch, ret would be
returned uninitialized, tripping -Werror=maybe-uninitialized. Initialize
it to 0.

Assisted-by: GitHubCopilot:claude-4.8-opus
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
wangjianyu3 2026-06-25 16:00:10 +08:00 committed by Alan C. Assis
parent ae718ba47f
commit d29ae9bda6

View file

@ -87,7 +87,7 @@ static int do_rexec(FAR struct rexec_arg_s *arg)
char buffer[REXEC_BUFSIZE];
struct pollfd fds[2];
int sock;
int ret;
int ret = 0;
sock = rexec_af(&arg->host, htons(arg->port), arg->user,
arg->password, arg->command,