From e4a54cc52c96775409ebf64e2cf1510ecb25d4c3 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 29 May 2018 20:45:23 +0300 Subject: [PATCH] Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning * cord/cordprnt.c (CORD_vsprintf): Replace while((c=expr)) with while((c=expr)!=0). --- cord/cordprnt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cord/cordprnt.c b/cord/cordprnt.c index f22bd744..56c7b75d 100644 --- a/cord/cordprnt.c +++ b/cord/cordprnt.c @@ -260,7 +260,7 @@ int CORD_vsprintf(CORD * out, CORD format, va_list args) char * str = va_arg(args, char *); register char c; - while ((c = *str++)) { + while ((c = *str++) != '\0') { CORD_ec_append(result, c); } goto done; @@ -349,7 +349,7 @@ int CORD_vsprintf(CORD * out, CORD format, va_list args) if (buf != result[0].ec_bufptr) { register char c; - while ((c = *buf++)) { + while ((c = *buf++) != '\0') { CORD_ec_append(result, c); } } else { -- 2.40.0