From cf88fb781ed2f1e6571c725be34bd4c382662220 Mon Sep 17 00:00:00 2001 From: Ko- Date: Fri, 7 Jun 2019 13:45:11 +0200 Subject: [PATCH] Satisfy linter --- common/sp800-185.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/sp800-185.c b/common/sp800-185.c index 929f8518..b21e81fc 100644 --- a/common/sp800-185.c +++ b/common/sp800-185.c @@ -3,16 +3,16 @@ #include "sp800-185.h" -static size_t left_encode(uint8_t *encbuf, size_t value) -{ +static size_t left_encode(uint8_t *encbuf, size_t value) { size_t n, i, v; - for ( v = value, n = 0; v && (n < sizeof(size_t)); ++n, v >>= 8 ) + for (v = value, n = 0; v && (n < sizeof(size_t)); n++, v >>= 8) { ; /* empty */ - if (n == 0) + } + if (n == 0) { n = 1; - for ( i = 1; i <= n; ++i ) - { + } + for (i = 1; i <= n; i++) { encbuf[i] = (uint8_t)(value >> (8 * (n-i))); } encbuf[0] = (uint8_t)n;