Browse Source

Satisfy linter

master
Ko- 5 years ago
parent
commit
cf88fb781e
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      common/sp800-185.c

+ 6
- 6
common/sp800-185.c View File

@@ -3,16 +3,16 @@


#include "sp800-185.h" #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; 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 */ ; /* empty */
if (n == 0)
}
if (n == 0) {
n = 1; n = 1;
for ( i = 1; i <= n; ++i )
{
}
for (i = 1; i <= n; i++) {
encbuf[i] = (uint8_t)(value >> (8 * (n-i))); encbuf[i] = (uint8_t)(value >> (8 * (n-i)));
} }
encbuf[0] = (uint8_t)n; encbuf[0] = (uint8_t)n;


Loading…
Cancel
Save