Skip to content

Commit

Permalink
Expand the MIN macro in mini_snprintf.h
Browse files Browse the repository at this point in the history
The MIN macro is not defined in any of the included headers.
Since it's only used in one place, replace the use with the intended
expansion instead of defining MIN.

Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
  • Loading branch information
deeglaze committed Sep 5, 2018
1 parent d607c79 commit 07fd35d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/inc/internal/mini_snprintf.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ static inline int __vsnprintf(char* buf, size_t size, const char* fmt, va_list a

total_len += len;

len = MIN(len, buf_remain);
len = len < buf_remain ? len : buf_remain;
memcpy(buf_pos, str, len);

buf_pos += len;
Expand Down

0 comments on commit 07fd35d

Please sign in to comment.