From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Mon, 7 Feb 2022 12:37:49 +0000 (+0000) Subject: Quieten a compiler warning -- might not work. X-Git-Tag: 4.1-rc1~24^2~285 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e07c202b7619fa250adacc7d0ee2c2b94d60140f;p=thirdparty%2Fshairport-sync.git Quieten a compiler warning -- might not work. --- diff --git a/rtp.c b/rtp.c index 58e3b227..ad27b29c 100644 --- a/rtp.c +++ b/rtp.c @@ -90,7 +90,7 @@ void check64conversion(const char *prompt, const uint8_t *source, uint64_t value if ((suppress_zeroes == 0) || (source[obfc] != 0)){ if (suppress_zeroes != 0) { if (source[obfc] < 0x10) { - snprintf(obfp, 2, "%1x", source[obfc]); + snprintf(obfp, 3, "%1x", source[obfc]); obfp+=1; } else { snprintf(obfp, 3, "%02x", source[obfc]); @@ -121,7 +121,7 @@ void check32conversion(const char *prompt, const uint8_t *source, uint32_t value if ((suppress_zeroes == 0) || (source[obfc] != 0)){ if (suppress_zeroes != 0) { if (source[obfc] < 0x10) { - snprintf(obfp, 2, "%1x", source[obfc]); + snprintf(obfp, 3, "%1x", source[obfc]); obfp+=1; } else { snprintf(obfp, 3, "%02x", source[obfc]);