summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_reg_nt.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server/srv_reg_nt.c')
-rw-r--r--source3/rpc_server/srv_reg_nt.c9
1 files changed, 4 insertions, 5 deletions
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);