1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-15 16:23:49 +03:00

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 commit is contained in:
Tim Prouty
2008-04-29 14:36:24 -07:00
committed by Volker Lendecke
parent 80e700e3bd
commit 6b189dabc5
29 changed files with 537 additions and 400 deletions

View File

@@ -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;
}