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/smbd/notify.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source3/smbd/notify.c') diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c index ffdf1c22e7..eb3384d9a4 100644 --- a/source3/smbd/notify.c +++ b/source3/smbd/notify.c @@ -82,10 +82,9 @@ static bool notify_marshall_changes(int num_changes, c = &changes[i]; - namelen = convert_string_allocate( - NULL, CH_UNIX, CH_UTF16LE, c->name, strlen(c->name)+1, - &uni_name.buffer, True); - if ((namelen == -1) || (uni_name.buffer == NULL)) { + if (!convert_string_allocate(NULL, CH_UNIX, CH_UTF16LE, + c->name, strlen(c->name)+1, &uni_name.buffer, + &namelen, True) || (uni_name.buffer == NULL)) { goto fail; } -- cgit