mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
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:
parent
ae718ba47f
commit
d29ae9bda6
1 changed files with 1 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue