diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-08-13 16:48:27 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-08-14 18:32:15 -0400 |
commit | f8bd8b97bea9273d166efdc06c3a6a54fc24ffdb (patch) | |
tree | 4fc1819b36bd3151538dac06909fe83e841b6c86 /src/command.h | |
parent | f3da473285557b0424d9b649bc67faa686d74393 (diff) | |
download | kutter-f8bd8b97bea9273d166efdc06c3a6a54fc24ffdb.tar.gz kutter-f8bd8b97bea9273d166efdc06c3a6a54fc24ffdb.tar.xz kutter-f8bd8b97bea9273d166efdc06c3a6a54fc24ffdb.zip |
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>
Diffstat (limited to 'src/command.h')
-rw-r--r-- | src/command.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/command.h b/src/command.h index 91d7cd80..e493c3ee 100644 --- a/src/command.h +++ b/src/command.h @@ -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); |