summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/util_unistr.c5
-rw-r--r--source3/libads/krb5_setpw.c6
-rw-r--r--source3/nsswitch/wb_common.c8
-rw-r--r--source3/nsswitch/winbindd_util.c2
-rw-r--r--source3/param/loadparm.c6
-rw-r--r--source3/rpc_parse/parse_lsa.c1
-rw-r--r--source3/rpc_server/srv_reg_nt.c2
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c3
-rw-r--r--source3/utils/profiles.c4
9 files changed, 9 insertions, 28 deletions
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c
index 8ed8c5c37f..d80bb2ce52 100644
--- a/source3/lib/util_unistr.c
+++ b/source3/lib/util_unistr.c
@@ -213,8 +213,9 @@ void init_valid_table(void)
size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate)
{
- return push_ucs2(NULL, dst, src, len,
- STR_UNICODE|STR_NOALIGN | (null_terminate?STR_TERMINATE:0));
+ int flags = null_terminate ? STR_UNICODE|STR_NOALIGN|STR_TERMINATE
+ : STR_UNICODE|STR_NOALIGN;
+ return push_ucs2(NULL, dst, src, len, flags);
}
diff --git a/source3/libads/krb5_setpw.c b/source3/libads/krb5_setpw.c
index dadce2593c..c261d15c21 100644
--- a/source3/libads/krb5_setpw.c
+++ b/source3/libads/krb5_setpw.c
@@ -317,23 +317,17 @@ static krb5_error_code parse_setpw_reply(krb5_context context,
switch(res_code) {
case KRB5_KPASSWD_ACCESSDENIED:
return KRB5KDC_ERR_BADOPTION;
- break;
case KRB5_KPASSWD_INITIAL_FLAG_NEEDED:
return KRB5KDC_ERR_BADOPTION;
/* return KV5M_ALT_METHOD; MIT-only define */
- break;
case KRB5_KPASSWD_ETYPE_NOSUPP:
return KRB5KDC_ERR_ETYPE_NOSUPP;
- break;
case KRB5_KPASSWD_BAD_PRINCIPAL:
return KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN;
- break;
case KRB5_KPASSWD_POLICY_REJECT:
return KRB5KDC_ERR_POLICY;
- break;
default:
return KRB5KRB_ERR_GENERIC;
- break;
}
}
}
diff --git a/source3/nsswitch/wb_common.c b/source3/nsswitch/wb_common.c
index b6f617eb95..5ed0b9161e 100644
--- a/source3/nsswitch/wb_common.c
+++ b/source3/nsswitch/wb_common.c
@@ -280,14 +280,6 @@ static int winbind_named_pipe_sock(const char *dir)
close(fd);
return -1;
-
- if (connect(fd, (struct sockaddr *)&sunaddr,
- sizeof(sunaddr)) == -1) {
- close(fd);
- return -1;
- }
-
- return fd;
}
/* Connect to winbindd socket */
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index 6b1a6b5b4d..14b6f03fd4 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -98,7 +98,7 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const
{
struct winbindd_domain *domain;
const char *alternative_name = NULL;
- static const DOM_SID null_sid;
+ static const DOM_SID null_sid = {0};
/* ignore alt_name if we are not in an AD domain */
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 00f191db28..3c97a3bb37 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -2004,9 +2004,9 @@ FN_LOCAL_INTEGER(lp_oplock_contention_limit, iOplockContentionLimit)
FN_LOCAL_INTEGER(lp_csc_policy, iCSCPolicy)
FN_LOCAL_INTEGER(lp_write_cache_size, iWriteCacheSize)
FN_LOCAL_INTEGER(lp_block_size, iBlock_size)
-FN_LOCAL_INTEGER(lp_allocation_roundup_size, iallocation_roundup_size);
-FN_LOCAL_INTEGER(lp_aio_read_size, iAioReadSize);
-FN_LOCAL_INTEGER(lp_aio_write_size, iAioWriteSize);
+FN_LOCAL_INTEGER(lp_allocation_roundup_size, iallocation_roundup_size)
+FN_LOCAL_INTEGER(lp_aio_read_size, iAioReadSize)
+FN_LOCAL_INTEGER(lp_aio_write_size, iAioWriteSize)
FN_LOCAL_CHAR(lp_magicchar, magic_char)
FN_GLOBAL_INTEGER(lp_winbind_cache_time, &Globals.winbind_cache_time)
FN_GLOBAL_INTEGER(lp_winbind_max_idle_children, &Globals.winbind_max_idle_children)
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c
index 884012c9be..d924ea27d1 100644
--- a/source3/rpc_parse/parse_lsa.c
+++ b/source3/rpc_parse/parse_lsa.c
@@ -3036,7 +3036,6 @@ static BOOL lsa_io_trustdom_query(const char *desc, prs_struct *ps, int depth, L
default:
DEBUG(0,("unsupported info-level: %d\n", info->info_class));
return False;
- break;
}
return True;
diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c
index 8b861f8431..7a5216ada5 100644
--- a/source3/rpc_server/srv_reg_nt.c
+++ b/source3/rpc_server/srv_reg_nt.c
@@ -1078,8 +1078,6 @@ WERROR _reg_save_key(pipes_struct *p, REG_Q_SAVE_KEY *q_u, REG_R_SAVE_KEY *r_u)
DEBUG(2,("_reg_save_key: Saving [%s] to %s in share %s\n", regkey->name, filename, lp_servicename(snum) ));
return backup_registry_key( regkey, filename );
-
- return WERR_OK;
}
/*******************************************************************
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index b607d32e54..e9dd015421 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -1597,11 +1597,9 @@ WERROR _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, S
DEBUG(3, ("_srv_net_share_set_info: client is trying to change csc policy from the network; must be done with smb.conf\n"));
return WERR_ACCESS_DENIED;
}
- break;
case 1006:
case 1007:
return WERR_ACCESS_DENIED;
- break;
case 1501:
pstrcpy(pathname, lp_pathname(snum));
fstrcpy(comment, lp_comment(snum));
@@ -1753,7 +1751,6 @@ WERROR _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_S
case 1006:
case 1007:
return WERR_ACCESS_DENIED;
- break;
case 1501:
/* DFS only level. */
return WERR_ACCESS_DENIED;
diff --git a/source3/utils/profiles.c b/source3/utils/profiles.c
index 52970bdffc..6bf9e44a14 100644
--- a/source3/utils/profiles.c
+++ b/source3/utils/profiles.c
@@ -188,7 +188,7 @@ int main( int argc, char *argv[] )
exit(1);
}
- if ((!change & new_val) || (change & !new_val)) {
+ if ((!change && new_val) || (change && !new_val)) {
fprintf(stderr, "You must specify both -c and -n if one or the other is set!\n");
poptPrintUsage(pc, stderr, 0);
exit(252);
@@ -225,5 +225,5 @@ int main( int argc, char *argv[] )
poptFreeContext(pc);
- exit( 0 );
+ return( 0 );
}