From bb869741ddc3d82da02c96bef592dab6074ff142 Mon Sep 17 00:00:00 2001 From: Tim Prouty Date: Mon, 3 Mar 2008 13:32:54 -0800 Subject: Cleanup size_t return values in convert_string_allocate This patch is the first iteration of an inside-out conversion to cleanup functions in charcnv.c returning size_t == -1 to indicate failure. (This used to be commit 59124382d2894a1b194b48dd82bc5f956959eb48) --- source3/utils/ntlm_auth_diagnostics.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source3/utils/ntlm_auth_diagnostics.c') diff --git a/source3/utils/ntlm_auth_diagnostics.c b/source3/utils/ntlm_auth_diagnostics.c index 846b5ef42b..dfd05ad51c 100644 --- a/source3/utils/ntlm_auth_diagnostics.c +++ b/source3/utils/ntlm_auth_diagnostics.c @@ -470,18 +470,17 @@ static bool test_plaintext(enum ntlm_break break_which) exit(1); } - if ((convert_string_allocate(NULL, CH_UNIX, + if (!convert_string_allocate(NULL, CH_UNIX, CH_DOS, password, strlen(password)+1, - &lm_response.data,True)) == -1) { + &lm_response.data, + &lm_response.length, True)) { DEBUG(0, ("convert_string_allocate failed!\n")); exit(1); } SAFE_FREE(password); - lm_response.length = strlen((const char *)lm_response.data); - switch (break_which) { case BREAK_NONE: break; -- cgit