Skip to content

Commit

Permalink
libmei: dump traffic only in debug builds
Browse files Browse the repository at this point in the history
The traffic dump should be enabled only in debug builds.

Signed-off-by: Alexander Usyskin <[email protected]>
  • Loading branch information
ausyskin authored and Tomas Winkler committed Sep 16, 2024
1 parent 718fe7f commit 76a0bdc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mei.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ static inline void __dump_buffer(const char *buf)
}
#endif /* ANDROID */

#ifdef DEBUG
static void dump_hex_buffer(const unsigned char *buf, size_t len)
{
#define LINE_LEN 16
Expand All @@ -91,6 +92,15 @@ static void mei_dump_hex_buffer(struct mei *me,

dump_hex_buffer(buf, len);
}
#else /* DEBUG */
static void mei_dump_hex_buffer(struct mei *me,
const unsigned char *buf, size_t len)
{
(void)(me);
(void)(buf);
(void)(len);
}
#endif /* DEBUG */

void mei_deinit(struct mei *me)
{
Expand Down

0 comments on commit 76a0bdc

Please sign in to comment.