Skip to content

Commit

Permalink
server/netssl.c: fix decl-after-statement
Browse files Browse the repository at this point in the history
NUT_UNUSED_VARIABLE() implementation counts as a code statement, so should be after true declarations.

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov authored Jan 21, 2024
1 parent c201297 commit e2e5223
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/netssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ static void nss_error(const char* text)
char buffer[SMALLBUF];
PRErrorCode err_num = PR_GetError();
PRInt32 err_len = PR_GetErrorTextLength();

if (err_len > 0) {
if (err_len < SMALLBUF) {
PR_GetErrorText(buffer);
Expand All @@ -210,11 +211,12 @@ static void nss_error(const char* text)
static int ssl_error(PRFileDesc *ssl, ssize_t ret)
{
char buffer[256];
NUT_UNUSED_VARIABLE(ssl);
NUT_UNUSED_VARIABLE(ret);
PRErrorCode err_num = PR_GetError();
PRInt32 err_len = PR_GetErrorTextLength();
PRInt32 length;
NUT_UNUSED_VARIABLE(ssl);
NUT_UNUSED_VARIABLE(ret);

if (err_len > 0) {
if (err_len < SMALLBUF) {
length = PR_GetErrorText(buffer);
Expand Down

0 comments on commit e2e5223

Please sign in to comment.