Bug: Transfer functions return -1, causing implementation-defined exit status #164
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
send_files()andsend_files_multithreaded()return-1on failure.client_cli.cthen returns this value directly frommain(). Returning a negative value frommain()is implementation-defined behavior (typically the lower 8 bits are interpreted as an unsigned exit code, so-1becomes 255, but this is not portable or intentional).Location
src/client/client_send.c:230-232,426,485src/client/client_cli.c:305—return exit_code;whereexit_codemay be-1.Suggested fix
0for success,1for general error,2for network/config error, etc.1(or a named constant) instead of-1from the transfer functions.Severity
Medium
Category
bug
This issue was automatically generated by the issue-creator agent.