diff options
Diffstat (limited to 'networking/slattach.c')
-rw-r--r-- | networking/slattach.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/slattach.c b/networking/slattach.c index e501d82e1..1987eb39c 100644 --- a/networking/slattach.c +++ b/networking/slattach.c | |||
@@ -43,7 +43,7 @@ static void save_state(void) | |||
43 | xioctl(handle, TIOCGETD, &saved_disc); | 43 | xioctl(handle, TIOCGETD, &saved_disc); |
44 | } | 44 | } |
45 | 45 | ||
46 | static int set_termios_state_and_warn(struct termios *state) | 46 | static int set_termios_state_or_warn(struct termios *state) |
47 | { | 47 | { |
48 | int ret; | 48 | int ret; |
49 | 49 | ||
@@ -78,12 +78,12 @@ static void restore_state_and_exit(int exitcode) | |||
78 | memcpy(&state, &saved_state, sizeof(state)); | 78 | memcpy(&state, &saved_state, sizeof(state)); |
79 | cfsetispeed(&state, B0); | 79 | cfsetispeed(&state, B0); |
80 | cfsetospeed(&state, B0); | 80 | cfsetospeed(&state, B0); |
81 | if (set_termios_state_and_warn(&state)) | 81 | if (set_termios_state_or_warn(&state)) |
82 | exitcode = 1; | 82 | exitcode = 1; |
83 | sleep(1); | 83 | sleep(1); |
84 | 84 | ||
85 | /* Restore line status */ | 85 | /* Restore line status */ |
86 | if (set_termios_state_and_warn(&saved_state)) | 86 | if (set_termios_state_or_warn(&saved_state)) |
87 | exit(EXIT_FAILURE); | 87 | exit(EXIT_FAILURE); |
88 | if (ENABLE_FEATURE_CLEAN_UP) | 88 | if (ENABLE_FEATURE_CLEAN_UP) |
89 | close(handle); | 89 | close(handle); |
@@ -99,7 +99,7 @@ static void set_state(struct termios *state, int encap) | |||
99 | int disc; | 99 | int disc; |
100 | 100 | ||
101 | /* Set line status */ | 101 | /* Set line status */ |
102 | if (set_termios_state_and_warn(state)) | 102 | if (set_termios_state_or_warn(state)) |
103 | goto bad; | 103 | goto bad; |
104 | /* Set line discliple (N_SLIP always) */ | 104 | /* Set line discliple (N_SLIP always) */ |
105 | disc = N_SLIP; | 105 | disc = N_SLIP; |