Skip to content

Commit 05423bf

Browse files
committed
Removed comments, clang format
1 parent eb9ef5a commit 05423bf

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

examples/posix/wh_posix_server/wh_posix_server.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,13 @@ static int _hardwareCryptoCb(int devId, struct wc_CryptoInfo* info, void* ctx)
266266
#endif
267267
static void Usage(const char* exeName)
268268
{
269-
WOLFHSM_CFG_PRINTF("Usage: %s --key <key_file_path> --id <key_id> --client <client_id> "
270-
"--nvminit <nvm_init_file_path> --type <type>\n",
271-
exeName);
269+
WOLFHSM_CFG_PRINTF(
270+
"Usage: %s --key <key_file_path> --id <key_id> --client <client_id> "
271+
"--nvminit <nvm_init_file_path> --type <type>\n",
272+
exeName);
272273
WOLFHSM_CFG_PRINTF("Example: %s --key key.bin --id 123 --client 456 "
273-
"--nvminit nvm_init.txt --type tcp\n",
274-
exeName);
274+
"--nvminit nvm_init.txt --type tcp\n",
275+
exeName);
275276
WOLFHSM_CFG_PRINTF("type: tcp (default), shm, dma\n");
276277
}
277278

@@ -282,7 +283,7 @@ int main(int argc, char** argv)
282283
const char* keyFilePath = NULL;
283284
const char* nvmInitFilePath = NULL;
284285
int keyId = WH_KEYID_ERASED; /* Default key ID if none provided */
285-
int clientId = 12; /* Default client ID if none provided */
286+
int clientId = 12; /* Default client ID if none provided */
286287
uint8_t memory[WH_POSIX_FLASH_RAM_SIZE] = {0};
287288
whServerConfig s_conf[1];
288289

test/wh_test_nvm_flash.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,12 @@ static void _HexDump(const char* p, size_t data_len)
5656
const unsigned char two_digits = 0x10;
5757
const unsigned char* u = (const unsigned char*)p;
5858

59-
/* Header line - use WH_TEST_DEBUG_PRINT for context */
6059
WH_TEST_DEBUG_PRINT(" HD:%p for %lu bytes\n", p, data_len);
6160
if ((p == NULL) || (data_len == 0))
6261
return;
6362

6463
size_t off = 0;
6564
for (off = 0; off < data_len; off++) {
66-
/* Use WH_TEST_PRINT for hex data - no prefix */
6765
if ((off % bytesPerLine) == 0)
6866
WH_TEST_PRINT(" ");
6967
if (u[off] < two_digits) {
@@ -130,8 +128,8 @@ static void _ShowList(const whNvmCb* cb, void* context)
130128
myMetadata.label, myMetadata.access, myMetadata.flags,
131129
myMetadata.len);
132130

133-
while ( (rc == 0) &&
134-
((myMetadata.len - offset) > (whNvmSize)sizeof(data))) {
131+
while ((rc == 0) &&
132+
((myMetadata.len - offset) > (whNvmSize)sizeof(data))) {
135133
/* Read the data from this object */
136134
rc = cb->Read(context, id, offset, sizeof(data), data);
137135

0 commit comments

Comments
 (0)