]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmb: Remove unused cli_is_error()
authorVolker Lendecke <vl@samba.org>
Mon, 19 Aug 2024 09:25:52 +0000 (11:25 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 20 Aug 2024 09:34:40 +0000 (09:34 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/libsmb/clierror.c
source3/libsmb/proto.h

index 628c0c82fc929730425c8a3eac906adf5778e8c0..3a024ea22e3c0130a18e8a970a6d4d002401db00 100644 (file)
@@ -50,24 +50,6 @@ int cli_status_to_errno(NTSTATUS status)
        return err;
 }
 
-/* Return true if the last packet was in error */
-
-bool cli_is_error(struct cli_state *cli)
-{
-       /* A socket error is always an error. */
-       if (!cli_state_is_connected(cli)) {
-               return true;
-       }
-
-       if (NT_STATUS_IS_DOS(cli->raw_status)) {
-               /* Return error if error class in non-zero */
-               uint8_t rcls = NT_STATUS_DOS_CLASS(cli->raw_status);
-               return rcls != 0;
-       }
-
-       return NT_STATUS_IS_ERR(cli->raw_status);
-}
-
 bool cli_state_is_connected(struct cli_state *cli)
 {
        if (cli == NULL) {
index 1cd8dbdaa6d56d713c262aba5dcc300c1038f842..cecd898d7cfe34b77ed878b4773280cee5a56da3 100644 (file)
@@ -224,7 +224,6 @@ NTSTATUS cli_smb(TALLOC_CTX *mem_ctx, struct cli_state *cli,
 /* The following definitions come from libsmb/clierror.c  */
 
 int cli_status_to_errno(NTSTATUS status);
-bool cli_is_error(struct cli_state *cli);
 bool cli_state_is_connected(struct cli_state *cli);
 
 /* The following definitions come from libsmb/clifile.c  */