summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-01-07 10:43:23 +0100
committerGünther Deschner <gd@samba.org>2010-03-24 17:34:56 +0100
commitd0ef97f74b61f0441b078845d0637f5dad3e2e16 (patch)
tree46b24ab47c95075d9d5d1c0c60ca41be1b61d9c7 /source3
parent0de3698be23d23b79ef52a4a2c51b1ac56f36445 (diff)
downloadsamba-d0ef97f74b61f0441b078845d0637f5dad3e2e16.tar.gz
samba-d0ef97f74b61f0441b078845d0637f5dad3e2e16.tar.bz2
samba-d0ef97f74b61f0441b078845d0637f5dad3e2e16.zip
s3:ntlmssp: use a 'bool ok' variable to make the code more readable
metze Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/ntlmssp_sign.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/source3/libsmb/ntlmssp_sign.c b/source3/libsmb/ntlmssp_sign.c
index 37bb0efdeb..9c7bc241e1 100644
--- a/source3/libsmb/ntlmssp_sign.c
+++ b/source3/libsmb/ntlmssp_sign.c
@@ -125,10 +125,16 @@ static NTSTATUS ntlmssp_make_packet_signature(struct ntlmssp_state *ntlmssp_stat
dump_data_pw("ntlmssp v2 sig ", sig->data, sig->length);
} else {
+ bool ok;
uint32_t crc;
crc = crc32_calc_buffer(data, length);
- if (!msrpc_gen(ntlmssp_state, sig, "dddd", NTLMSSP_SIGN_VERSION, 0, crc, ntlmssp_state->ntlmv1_seq_num)) {
+
+ ok = msrpc_gen(ntlmssp_state,
+ sig, "dddd",
+ NTLMSSP_SIGN_VERSION, 0, crc,
+ ntlmssp_state->ntlmv1_seq_num);
+ if (!ok) {
return NT_STATUS_NO_MEMORY;
}
@@ -285,10 +291,16 @@ NTSTATUS ntlmssp_seal_packet(struct ntlmssp_state *ntlmssp_state,
sig->data+4, 8);
}
} else {
+ bool ok;
uint32_t crc;
crc = crc32_calc_buffer(data, length);
- if (!msrpc_gen(ntlmssp_state, sig, "dddd", NTLMSSP_SIGN_VERSION, 0, crc, ntlmssp_state->ntlmv1_seq_num)) {
+
+ ok = msrpc_gen(ntlmssp_state,
+ sig, "dddd",
+ NTLMSSP_SIGN_VERSION, 0, crc,
+ ntlmssp_state->ntlmv1_seq_num);
+ if (!ok) {
return NT_STATUS_NO_MEMORY;
}