File tree Expand file tree Collapse file tree 2 files changed +9
-16
lines changed Expand file tree Collapse file tree 2 files changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ uint8_t shell_getc_serial(struct shell *p_shell);
170
170
void shell_special_serial (struct shell * p_shell , uint8_t ch );
171
171
void kick_shell (struct shell * p_shell );
172
172
173
- int shell_puts (struct shell * p_shell , const char * str_ptr );
173
+ void shell_puts (struct shell * p_shell , const char * str_ptr );
174
174
int shell_set_name (struct shell * p_shell , const char * name );
175
175
int shell_trigger_crash (struct shell * p_shell , int argc , char * * argv );
176
176
Original file line number Diff line number Diff line change @@ -159,23 +159,16 @@ int shell_init(void)
159
159
return status ;
160
160
}
161
161
162
- int shell_puts (struct shell * p_shell , const char * str_ptr )
162
+ /**
163
+ * @pre p_shell != NULL
164
+ * @pre p_shell->session_io.io_puts != NULL
165
+ * @pre str_ptr != NULL
166
+ */
167
+ void shell_puts (struct shell * p_shell , const char * str_ptr )
163
168
{
164
- int status ;
165
-
166
- if ((p_shell != NULL ) && (p_shell -> session_io .io_puts != NULL ) &&
167
- (str_ptr != NULL )) {
168
- /* Transmit data using this shell session's 'puts' function */
169
- p_shell -> session_io .io_puts (p_shell , str_ptr );
170
-
171
- status = 0 ;
172
- } else {
173
- /* Error: Invalid request */
174
- status = - EINVAL ;
169
+ /* Transmit data using this shell session's 'puts' function */
170
+ p_shell -> session_io .io_puts (p_shell , str_ptr );
175
171
176
- }
177
-
178
- return status ;
179
172
}
180
173
181
174
int shell_set_name (struct shell * p_shell , const char * name )
You can’t perform that action at this time.
0 commit comments