From b685ab2539e29f7a57ae5971bef4b5fcf829c190 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 22 May 2023 13:39:40 +0200 Subject: [PATCH] ares_expand_name: fix compiler warnings (#522) Fix some compiler warnings (not introduced in this release) Fix By: Daniel Stenberg (@bagder) --- src/lib/ares_expand_name.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/ares_expand_name.c b/src/lib/ares_expand_name.c index 6c7a35a7..ad1c97f9 100644 --- a/src/lib/ares_expand_name.c +++ b/src/lib/ares_expand_name.c @@ -179,9 +179,9 @@ int ares__expand_name_validated(const unsigned char *encoded, if (!ares__isprint(*p) && !(name_len == 1 && *p == 0)) { *q++ = '\\'; - *q++ = '0' + *p / 100; - *q++ = '0' + (*p % 100) / 10; - *q++ = '0' + (*p % 10); + *q++ = (char)('0' + *p / 100); + *q++ = (char)('0' + (*p % 100) / 10); + *q++ = (char)('0' + (*p % 10)); } else if (is_reservedch(*p)) {