From 5128c1a99f713c2e6b351993def99223b8b4f1b9 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 21 Feb 2018 08:54:13 +0000 Subject: [PATCH] localized a local variable into a loop in PUT_OOCH and PUT_OOCS in logfmtv --- lib/logfmtv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/logfmtv.h b/lib/logfmtv.h index a3ee7d1..8e27aa7 100644 --- a/lib/logfmtv.h +++ b/lib/logfmtv.h @@ -72,8 +72,8 @@ #undef PUT_OOCS #define PUT_OOCH(c,n) do { \ - int xx; \ if (n > 0) { \ + int xx; \ if ((xx = data->putch (hcl, data->mask, c, n)) <= -1) goto oops; \ if (xx == 0) goto done; \ data->count += n; \ @@ -81,8 +81,8 @@ } while (0) #define PUT_OOCS(ptr,len) do { \ - int xx; \ if (len > 0) { \ + int xx; \ if ((xx = data->putcs (hcl, data->mask, ptr, len)) <= -1) goto oops; \ if (xx == 0) goto done; \ data->count += len; \