From 8171a1ccd3fbdd1f76669b4d39a7fb2d75040b41 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 19 Aug 2024 11:24:24 +0200 Subject: [PATCH] libsmb: Remove a call to cli_is_error() We are already in the !NT_STATUS_IS_OK if-branch, so this call was redundant Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider --- source3/libsmb/libsmb_dir.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/source3/libsmb/libsmb_dir.c b/source3/libsmb/libsmb_dir.c index 240eec48b03..1801afffc38 100644 --- a/source3/libsmb/libsmb_dir.c +++ b/source3/libsmb/libsmb_dir.c @@ -996,12 +996,13 @@ SMBC_opendir_ctx(SMBCCTX *context, } } - /* - * If there was an error and the server is no - * good any more... - */ - if (cli_is_error(targetcli) && - smbc_getFunctionCheckServer(context)(context, srv)) { + /* + * There was an error (we're in the + * !NT_STATUS_IS_OK branch) and the + * server good any more... + */ + if (smbc_getFunctionCheckServer( + context)(context, srv)) { /* ... then remove it. */ if (smbc_getFunctionRemoveUnusedServer(context)(context, -- 2.47.3