mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-11-10 07:16:06 +01: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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user