summaryrefslogtreecommitdiff
path: root/source3
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
commit14a85b0008a6bf227d5464a4e29a9a53d6695bd0 (patch)
treed6ab524859da916bad21e91e7dcd1caa1b98bdea /source3
parent452baba8cb2f644b1f57161a2bfebf570efc596c (diff)
downloadsamba-14a85b0008a6bf227d5464a4e29a9a53d6695bd0.tar.gz
samba-14a85b0008a6bf227d5464a4e29a9a53d6695bd0.tar.bz2
samba-14a85b0008a6bf227d5464a4e29a9a53d6695bd0.zip
Merge of SMB_ASSERT.
(This used to be commit 1094e1ffde09b0393b11d2cce148b6da893348c1)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_client/cli_pipe.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 71e422f251..61c6f2889f 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/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) {