-
Notifications
You must be signed in to change notification settings - Fork 386
Open
Description
This if statement
Lines 1322 to 1324 in 96e9b99
| ret = setup_terminal_socketpair (entrypoint_args, &console_socketpair); | |
| if (UNLIKELY (ret < 0)) | |
| return ret; |
has a condition that never evaluates to true because ret is always 0.
See function definition:
Lines 1145 to 1154 in 96e9b99
| static int | |
| setup_terminal_socketpair (struct container_entrypoint_s *entrypoint_args, int *console_socketpair) | |
| { | |
| if (entrypoint_args->terminal_socketpair[0] >= 0) | |
| { | |
| close_and_reset (&entrypoint_args->terminal_socketpair[0]); | |
| *console_socketpair = entrypoint_args->terminal_socketpair[1]; | |
| } | |
| return 0; | |
| } |
discussion
If it is a design choice to check the return value (for the same reason as in #1285 (comment)), then crun_make_error() is missing in the line
Line 1324 in 96e9b99
| return ret; |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels