Skip to content

Commit f94489b

Browse files
Fix issues in documentation of wc_LoadStaticMemory's return code.
1 parent 59c14cd commit f94489b

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

doc/dox_comments/header_files/memory.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,8 @@ int wolfSSL_is_static_memory(WOLFSSL* ssl, WOLFSSL_MEM_CONN_STATS* mem_stats);
376376
buffers to themselves for their lifetime.
377377
WOLFMEM_TRACK_STATS - each SSL keeps track of memory stats while running
378378
379-
\return none This function does not return a value.
379+
\return Returns 0 on success.
380+
\return Returns a non-zero integer on failure.
380381
381382
\param pHint WOLFSSL_HEAP_HINT structure to use
382383
\param buf memory to use for all operations.
@@ -396,7 +397,7 @@ int wolfSSL_is_static_memory(WOLFSSL* ssl, WOLFSSL_MEM_CONN_STATS* mem_stats);
396397
// load in memory for use
397398
398399
ret = wc_LoadStaticMemory(&hint, memory, memorySz, flag, 0);
399-
if (ret != SSL_SUCCESS) {
400+
if (ret) {
400401
// handle error case
401402
}
402403
...
@@ -419,7 +420,8 @@ int wc_LoadStaticMemory(WOLFSSL_HEAP_HINT** pHint, unsigned char* buf,
419420
into functions. This extended version allows for custom bucket sizes and distributions
420421
instead of using the default predefined sizes.
421422
422-
\return none This function does not return a value.
423+
\return Returns 0 on success.
424+
\return Returns a non-zero integer on failure.
423425
424426
\param pHint WOLFSSL_HEAP_HINT handle to initialize
425427
\param listSz number of entries in the size and distribution lists
@@ -447,7 +449,7 @@ int wc_LoadStaticMemory(WOLFSSL_HEAP_HINT** pHint, unsigned char* buf,
447449
448450
ret = wc_LoadStaticMemory_ex(&hint, listSz, sizeList, distList,
449451
memory, memorySz, flag, 0);
450-
if (ret != SSL_SUCCESS) {
452+
if (ret) {
451453
// handle error case
452454
}
453455
...

0 commit comments

Comments
 (0)