summaryrefslogtreecommitdiffstats
path: root/ldap/servers/plugins/replication
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2010-07-01 11:39:02 -0600
committerRich Megginson <rmeggins@redhat.com>2010-07-06 10:32:03 -0600
commit4a103859b7100bc30046ecba3efca2e8f0b09c7d (patch)
treec6e98af614c13e71852b1da536385220f9324934 /ldap/servers/plugins/replication
parent830d55e8cc9d4a69f099b1c0ee00a93817c8fabb (diff)
Bug 610177 - fix coverity Defect Type: Uninitialized variables issues
https://bugzilla.redhat.com/show_bug.cgi?id=610177 Resolves: bug 610177 Bug Description: fix coverity Defect Type: Uninitialized variables issues Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: Initialize variables to 0, NULL, or an appropriate error code. Got rid of the unused lexer code. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
Diffstat (limited to 'ldap/servers/plugins/replication')
-rw-r--r--ldap/servers/plugins/replication/repl5_connection.c2
-rw-r--r--ldap/servers/plugins/replication/repl5_inc_protocol.c4
-rw-r--r--ldap/servers/plugins/replication/windows_connection.c4
-rw-r--r--ldap/servers/plugins/replication/windows_protocol_util.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/ldap/servers/plugins/replication/repl5_connection.c b/ldap/servers/plugins/replication/repl5_connection.c
index bd285184..aacdc557 100644
--- a/ldap/servers/plugins/replication/repl5_connection.c
+++ b/ldap/servers/plugins/replication/repl5_connection.c
@@ -639,7 +639,7 @@ perform_operation(Repl_Connection *conn, int optype, const char *dn,
int deleteoldrdn, LDAPControl *update_control,
const char *extop_oid, struct berval *extop_payload, int *message_id)
{
- int rc;
+ int rc = -1;
ConnResult return_value = CONN_OPERATION_FAILED;
LDAPControl *server_controls[3];
/* LDAPControl **loc_returned_controls; */
diff --git a/ldap/servers/plugins/replication/repl5_inc_protocol.c b/ldap/servers/plugins/replication/repl5_inc_protocol.c
index 6475eb89..e4c6e2bd 100644
--- a/ldap/servers/plugins/replication/repl5_inc_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_inc_protocol.c
@@ -1384,7 +1384,7 @@ reset_events (Private_Repl_Protocol *prp)
ConnResult
replay_update(Private_Repl_Protocol *prp, slapi_operation_parameters *op, int *message_id)
{
- ConnResult return_value;
+ ConnResult return_value = CONN_OPERATION_FAILED;
LDAPControl *update_control;
char *parentuniqueid;
LDAPMod **modrdn_mods = NULL;
@@ -2202,7 +2202,7 @@ examine_update_vector(Private_Repl_Protocol *prp, RUV *remote_ruv)
static PRBool
ignore_error_and_keep_going(int error)
{
- int return_value;
+ int return_value = PR_FALSE;
switch (error)
{
diff --git a/ldap/servers/plugins/replication/windows_connection.c b/ldap/servers/plugins/replication/windows_connection.c
index a1e74c44..8aabfdbb 100644
--- a/ldap/servers/plugins/replication/windows_connection.c
+++ b/ldap/servers/plugins/replication/windows_connection.c
@@ -306,7 +306,7 @@ windows_perform_operation(Repl_Connection *conn, int optype, const char *dn,
const char *extop_oid, struct berval *extop_payload, char **retoidp,
struct berval **retdatap, LDAPControl ***returned_controls)
{
- int rc = LDAP_SUCCESS;
+ int rc = -1;
ConnResult return_value;
LDAPControl **loc_returned_controls;
const char *op_string = NULL;
@@ -316,7 +316,7 @@ windows_perform_operation(Repl_Connection *conn, int optype, const char *dn,
if (windows_conn_connected(conn))
{
- int msgid;
+ int msgid = -2; /* should match no messages */
conn->last_operation = optype;
switch (optype)
diff --git a/ldap/servers/plugins/replication/windows_protocol_util.c b/ldap/servers/plugins/replication/windows_protocol_util.c
index 65de19dd..3c6b4d4c 100644
--- a/ldap/servers/plugins/replication/windows_protocol_util.c
+++ b/ldap/servers/plugins/replication/windows_protocol_util.c
@@ -1640,7 +1640,7 @@ is_straight_mapped_attr(const char *type, int is_user /* or group */, int is_nt4
static int
is_single_valued_attr(const char *type)
{
- int found;
+ int found = 0;
size_t offset = 0;
char *this_attr = NULL;