]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmb: Remove a call to cli_is_error()
authorVolker Lendecke <vl@samba.org>
Mon, 19 Aug 2024 09:24:24 +0000 (11:24 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 20 Aug 2024 09:34:40 +0000 (09:34 +0000)
We are already in the !NT_STATUS_IS_OK if-branch, so this call was
redundant

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/libsmb/libsmb_dir.c

index 240eec48b0395c819d2c34d6278bcb97b0bc98f0..1801afffc38f32eea2d5df18813b28e6c15f4e09 100644 (file)
@@ -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,