From: Volker Lendecke Date: Sat, 3 Jan 2026 11:14:09 +0000 (+0100) Subject: printing: Slightly simplify move_driver_file_to_download_area() X-Git-Tag: tdb-1.4.15~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe8d9b418978333d323fb863ce2dae04caac01cf;p=thirdparty%2Fsamba.git printing: Slightly simplify move_driver_file_to_download_area() Signed-off-by: Volker Lendecke Reviewed-by: Anoop C S --- diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index d5b918a569d..56fee826bd4 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -1427,7 +1427,11 @@ static WERROR move_driver_file_to_download_area(TALLOC_CTX *mem_ctx, return WERR_NOT_ENOUGH_MEMORY; } - if (version != -1 && (version = file_version_is_newer(conn, old_name, new_name)) > 0) { + if (version == -1) { + goto done; + } + + if ((version = file_version_is_newer(conn, old_name, new_name)) > 0) { struct files_struct *dirfsp = NULL; status = driver_unix_convert(conn, @@ -1465,6 +1469,7 @@ static WERROR move_driver_file_to_download_area(TALLOC_CTX *mem_ctx, } } +done: ret = WERR_OK; out: TALLOC_FREE(smb_fname_old);