summaryrefslogtreecommitdiffstats
path: root/source/rpc_client/cli_pipe.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-10-17 05:23:14 +0000
committerTim Potter <tpot@samba.org>2002-10-17 05:23:14 +0000
commit1094e1ffde09b0393b11d2cce148b6da893348c1 (patch)
tree1b558eb06403d6ba3f9ff5b592199cdbf6d8219f /source/rpc_client/cli_pipe.c
parent20986489f4736820a4981c6aa0eecccf169f0170 (diff)
downloadsamba-1094e1ffde09b0393b11d2cce148b6da893348c1.tar.gz
samba-1094e1ffde09b0393b11d2cce148b6da893348c1.tar.xz
samba-1094e1ffde09b0393b11d2cce148b6da893348c1.zip
Merge of SMB_ASSERT.
Diffstat (limited to 'source/rpc_client/cli_pipe.c')
-rw-r--r--source/rpc_client/cli_pipe.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/rpc_client/cli_pipe.c b/source/rpc_client/cli_pipe.c
index 71e422f2519..61c6f2889ff 100644
--- a/source/rpc_client/cli_pipe.c
+++ b/source/rpc_client/cli_pipe.c
@@ -1253,8 +1253,9 @@ BOOL cli_nt_session_open(struct cli_state *cli, const int pipe_idx)
SMB_ASSERT(cli->nt_pipe_fnum == 0);
- if ( (pipe_idx < 0) || (pipe_idx >= PI_MAX_PIPES) )
- return False;
+ /* The pipe index must fall within our array */
+
+ SMB_ASSERT((pipe_idx >= 0) && (pipe_idx < PI_MAX_PIPES));
if (cli->capabilities & CAP_NT_SMBS) {
if ((fnum = cli_nt_create(cli, &pipe_names[pipe_idx].client_pipe[5], DESIRED_ACCESS_PIPE)) == -1) {