From fb37f156009611af0dd454a0fb0829a09cd638ac Mon Sep 17 00:00:00 2001 From: Tim Prouty Date: Tue, 29 Apr 2008 14:36:24 -0700 Subject: Cleanup size_t return values in callers of convert_string_allocate This patch is the second iteration of an inside-out conversion to cleanup functions in charcnv.c returning size_t == -1 to indicate failure. (This used to be commit 6b189dabc562d86dcaa685419d0cb6ea276f100d) --- source3/libsmb/smbencrypt.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source3/libsmb/smbencrypt.c') diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c index 11f8780a47..f339b6b9f6 100644 --- a/source3/libsmb/smbencrypt.c +++ b/source3/libsmb/smbencrypt.c @@ -172,15 +172,15 @@ bool ntv2_owf_gen(const uchar owf[16], HMACMD5Context ctx; - user_byte_len = push_ucs2_allocate(&user, user_in); - if (user_byte_len == (size_t)-1) { - DEBUG(0, ("push_uss2_allocate() for user returned -1 (probably malloc() failure)\n")); + if (!push_ucs2_allocate(&user, user_in, &user_byte_len)) { + DEBUG(0, ("push_uss2_allocate() for user failed: %s\n", + strerror(errno))); return False; } - domain_byte_len = push_ucs2_allocate(&domain, domain_in); - if (domain_byte_len == (size_t)-1) { - DEBUG(0, ("push_uss2_allocate() for domain returned -1 (probably malloc() failure)\n")); + if (!push_ucs2_allocate(&domain, domain_in, &domain_byte_len)) { + DEBUG(0, ("push_uss2_allocate() for domain failed: %s\n", + strerror(errno))); return False; } -- cgit