Skip to content

Commit 4d0af48

Browse files
Fix typo and remove redundent return value check
1 parent 37baeab commit 4d0af48

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

examples/demo/client/wh_demo_client_auth.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ static int wh_DemoClient_AuthUserSetPermissions(whClientContext* clientContext)
353353
permissions.groupPermissions |= WH_MESSAGE_GROUP_CRYPTO;
354354

355355
/* Enable all CRYPTO actions by setting all bits in all words, an example of
356-
* a CRYTPO action is WC_ALGO_TYPE_CIPHER or WC_ALGO_TYPE_PK*/
356+
* a CRYPTO action is WC_ALGO_TYPE_CIPHER or WC_ALGO_TYPE_PK*/
357357
{
358358
int groupIndex = (WH_MESSAGE_GROUP_CRYPTO >> 8) & 0xFF;
359359
int wordIndex;
@@ -372,19 +372,13 @@ static int wh_DemoClient_AuthUserSetPermissions(whClientContext* clientContext)
372372
}
373373

374374
rc = wh_Client_AuthUserGet(clientContext, "demo", &serverRc, &userId, &permissions);
375-
if (rc != 0) {
376-
return rc;
377-
}
378375
if (rc != 0 || serverRc != 0) {
379376
printf("[AUTH-DEMO] Failed to get user: %d, server error %d\n", rc,
380377
serverRc);
381378
return rc != 0 ? rc : (int)serverRc;
382379
}
383380

384381
rc = wh_Client_AuthLogout(clientContext, adminUserId, &serverRc);
385-
if (rc != 0) {
386-
return rc;
387-
}
388382
if (serverRc != 0) {
389383
return (int)serverRc;
390384
}

0 commit comments

Comments
 (0)