diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-08-14 17:23:05 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-08-14 17:24:11 +0200 |
commit | e78605556770c19c7a2e52fbc67c1a89718ba9de (patch) | |
tree | 241d13319fd56822c3286e793e5721c4f8f4ee5b /src | |
parent | 7cca0da1cc58bd589989684147ae3a0cd5819902 (diff) |
osmux: Slightly improve output format of osmux_snprintf
The buffer for osmux_test is increased as the former doesn't seem to be
able to cope with the whole output.
Change-Id: Ic838dd9d7ad89b4510ccfa58c0390c69a075b616
Diffstat (limited to 'src')
-rw-r--r-- | src/osmux.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/osmux.c b/src/osmux.c index 2481d6a..b3c43e2 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -877,12 +877,15 @@ static int osmux_snprintf_payload(char *buf, size_t size, int ret, i; int len = size, offset = 0; + ret = snprintf(buf+offset, len, "[ "); + SNPRINTF_BUFFER_SIZE(ret, size, len, offset); + for (i=0; i<payload_len; i++) { ret = snprintf(buf+offset, len, "%02x ", payload[i]); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); } - ret = snprintf(buf+offset, len, "]"); + ret = snprintf(buf+offset, len, "] "); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); return offset; |