mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-08 23:46:25 -06:00
command: Don't pass max_size to command_encodef()
The command_encodef() can read the max_size parameter directly from the 'struct command_encoder' passed into it. Also, there is no need to check that a message will fit in a buffer if the buffer is declared to be MESSAGE_MAX in size. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
f3da473285
commit
f8bd8b97be
7 changed files with 24 additions and 29 deletions
|
@ -63,8 +63,8 @@ enum {
|
|||
// command.c
|
||||
char *command_parsef(char *p, char *maxend
|
||||
, const struct command_parser *cp, uint32_t *args);
|
||||
uint8_t command_encodef(char *buf, uint8_t buf_len
|
||||
, const struct command_encoder *ce, va_list args);
|
||||
uint8_t command_encodef(char *buf, const struct command_encoder *ce
|
||||
, va_list args);
|
||||
void command_sendf(const struct command_encoder *ce, ...);
|
||||
void command_add_frame(char *buf, uint8_t msglen);
|
||||
int8_t command_find_block(char *buf, uint8_t buf_len, uint8_t *pop_count);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue