From 14a85b0008a6bf227d5464a4e29a9a53d6695bd0 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 17 Oct 2002 05:23:14 +0000 Subject: Merge of SMB_ASSERT. (This used to be commit 1094e1ffde09b0393b11d2cce148b6da893348c1) --- source3/rpc_client/cli_pipe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/rpc_client/cli_pipe.c') 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) { -- cgit