]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Simplify find_pipe_fns_by_context slightly
authorVolker Lendecke <vl@samba.org>
Tue, 6 Jan 2009 10:32:46 +0000 (11:32 +0100)
committerVolker Lendecke <vl@samba.org>
Fri, 9 Jan 2009 21:48:09 +0000 (22:48 +0100)
source3/rpc_server/srv_pipe.c

index 980630cb94ce237133545398c05216ede0e27840..03d9c5b208328c865b85ce1094aa89f8c9bbf0f7 100644 (file)
@@ -2201,21 +2201,17 @@ bool api_pipe_schannel_process(pipes_struct *p, prs_struct *rpc_in, uint32 *p_ss
 static PIPE_RPC_FNS* find_pipe_fns_by_context( PIPE_RPC_FNS *list, uint32 context_id )
 {
        PIPE_RPC_FNS *fns = NULL;
-       PIPE_RPC_FNS *tmp = NULL;
 
        if ( !list ) {
                DEBUG(0,("find_pipe_fns_by_context: ERROR!  No context list for pipe!\n"));
                return NULL;
        }
 
-       for (tmp=list; tmp; tmp=tmp->next ) {
-               if ( tmp->context_id == context_id )
-                       break;
+       for (fns=list; fns; fns=fns->next ) {
+               if ( fns->context_id == context_id )
+                       return fns;
        }
-
-       fns = tmp;
-
-       return fns;
+       return NULL;
 }
 
 /****************************************************************************