From 4a103859b7100bc30046ecba3efca2e8f0b09c7d Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Thu, 1 Jul 2010 11:39:02 -0600 Subject: 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 --- ldap/servers/plugins/cos/cos_cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ldap/servers/plugins/cos/cos_cache.c') diff --git a/ldap/servers/plugins/cos/cos_cache.c b/ldap/servers/plugins/cos/cos_cache.c index b5aace63..bc79ee5c 100644 --- a/ldap/servers/plugins/cos/cos_cache.c +++ b/ldap/servers/plugins/cos/cos_cache.c @@ -1101,7 +1101,7 @@ static int cos_dn_defs_cb (Slapi_Entry* e, void *callback_data) { static int cos_cache_add_dn_defs(char *dn, cosDefinitions **pDefs, int *vattr_cacheable) { Slapi_PBlock *pDnSearch = 0; - struct dn_defs_info info; + struct dn_defs_info info = {NULL, 0, 0}; pDnSearch = slapi_pblock_new(); if (pDnSearch) { info.ret=-1; /* assume no good defs */ @@ -1314,7 +1314,7 @@ static int cos_cache_add_dn_tmpls(char *dn, cosAttrValue *pCosSpecifier, cosAttr { void *plugin_id; int scope; - struct tmpl_info info; + struct tmpl_info info = {NULL, 0, 0}; Slapi_PBlock *pDnSearch = 0; LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_add_dn_tmpls\n",0,0,0); @@ -1714,7 +1714,7 @@ int cos_cache_getref(cos_cache **pptheCache) */ int cos_cache_addref(cos_cache *ptheCache) { - int ret; + int ret = 0; cosCache *pCache = (cosCache*)ptheCache; LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_addref\n",0,0,0); -- cgit