summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-11-05 12:52:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:32 -0500
commitdc73064bc51a931d4b9247c36f3f67402643d9dc (patch)
tree1b5676e3897557ec4298650c861e19be818e6b7b /source4/torture
parent6e3b0a037878fdbb685528112be7c9c298260049 (diff)
downloadsamba-dc73064bc51a931d4b9247c36f3f67402643d9dc.tar.gz
samba-dc73064bc51a931d4b9247c36f3f67402643d9dc.tar.bz2
samba-dc73064bc51a931d4b9247c36f3f67402643d9dc.zip
r3557: Use a switch, not a series of if/else if statements.
Andrew Bartlett (This used to be commit fb7bc73f581c8b13041a91a115b4932f76b00ca7)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/netlogon.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 6d81b774d8..75f903d8c8 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -280,6 +280,7 @@ struct samlogon_state {
struct netr_LogonSamLogon r;
struct netr_Authenticator auth, auth2;
struct creds_CredentialState creds;
+
DATA_BLOB chall;
};
@@ -374,14 +375,16 @@ static NTSTATUS check_samlogon(struct samlogon_state *samlogon_state,
}
/* find and decyrpt the session keys, return in parameters above */
- if (r->in.validation_level == 2) {
- base = &r->out.validation.sam2->base;
- } else if (r->in.validation_level == 3) {
- base = &r->out.validation.sam3->base;
- } else if (r->in.validation_level == 6) {
- base = &r->out.validation.sam6->base;
- } else {
- base = NULL;
+ switch (r->in.validation_level) {
+ case 2:
+ base = &r->out.validation.sam2->base;
+ break;
+ case 3:
+ base = &r->out.validation.sam3->base;
+ break;
+ case 6:
+ base = &r->out.validation.sam6->base;
+ break;
}
if (r->in.validation_level != 6) {