diff options
| -rw-r--r-- | source3/rpc_server/srv_lsa_hnd.c | 19 | ||||
| -rw-r--r-- | source3/rpc_server/srv_reg_nt.c | 9 | ||||
| -rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 2 | 
3 files changed, 15 insertions, 15 deletions
diff --git a/source3/rpc_server/srv_lsa_hnd.c b/source3/rpc_server/srv_lsa_hnd.c index e4a00443a1..5affa9f5b0 100644 --- a/source3/rpc_server/srv_lsa_hnd.c +++ b/source3/rpc_server/srv_lsa_hnd.c @@ -110,15 +110,16 @@ BOOL create_policy_hnd(pipes_struct *p, POLICY_HND *hnd, void (*free_fn)(void *)  	pol->data_ptr = data_ptr;  	pol->free_fn = free_fn; -    pol_hnd_low++; -    if (pol_hnd_low == 0) (pol_hnd_high)++; - -    SIVAL(&pol->pol_hnd.data1, 0 , 0);  /* first bit must be null */ -    SIVAL(&pol->pol_hnd.data2, 0 , pol_hnd_low ); /* second bit is incrementing */ -    SSVAL(&pol->pol_hnd.data3, 0 , pol_hnd_high); /* second bit is incrementing */ -    SSVAL(&pol->pol_hnd.data4, 0 , (pol_hnd_high>>16)); /* second bit is incrementing */ -    SIVAL(pol->pol_hnd.data5, 0, time(NULL)); /* something random */ -    SIVAL(pol->pol_hnd.data5, 4, sys_getpid()); /* something more random */ +	pol_hnd_low++; +	if (pol_hnd_low == 0) +		(pol_hnd_high)++; + +	SIVAL(&pol->pol_hnd.data1, 0 , 0);  /* first bit must be null */ +	SIVAL(&pol->pol_hnd.data2, 0 , pol_hnd_low ); /* second bit is incrementing */ +	SSVAL(&pol->pol_hnd.data3, 0 , pol_hnd_high); /* second bit is incrementing */ +	SSVAL(&pol->pol_hnd.data4, 0 , (pol_hnd_high>>16)); /* second bit is incrementing */ +	SIVAL(pol->pol_hnd.data5, 0, time(NULL)); /* something random */ +	SIVAL(pol->pol_hnd.data5, 4, sys_getpid()); /* something more random */  	DLIST_ADD(p->pipe_handles->Policy, pol);  	p->pipe_handles->count++; diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c index 5901a783b9..ad47fe2d4e 100644 --- a/source3/rpc_server/srv_reg_nt.c +++ b/source3/rpc_server/srv_reg_nt.c @@ -27,10 +27,9 @@  #include "includes.h" -struct reg_info -{ -    /* for use by \PIPE\winreg */ -    fstring name; /* name of registry key */ +struct reg_info { +	/* for use by \PIPE\winreg */ +	fstring name; /* name of registry key */  };  static void free_reg_info(void *ptr) @@ -124,7 +123,7 @@ NTSTATUS _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u)  	DEBUG(5,("_reg_info: %d\n", __LINE__)); -	if (find_policy_by_hnd(p, &q_u->pol, NULL) == -1) +	if (!find_policy_by_hnd(p, &q_u->pol, NULL))  		return NT_STATUS_INVALID_HANDLE;  	rpcstr_pull(name, q_u->uni_type.buffer, sizeof(name), q_u->uni_type.uni_str_len*2, 0); diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index bdd2bbf31b..cffd88c3aa 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -316,7 +316,7 @@ static WERROR delete_printer_handle(pipes_struct *p, POLICY_HND *hnd)  	}  	return WERR_OK; -}	 +}  /****************************************************************************    return the snum of a printer corresponding to an handle  | 
