On Thu, Nov 22, 2012 at 10:28:27AM +0100, Petr Spacek wrote: > Hello, > > Remove dead assignments in manager_create_db_instance() and make > log messages verbose. > > Dead assignments were reported by Clang static code analysis.
Ack > From 20b87c908c3ae2c05c10f0ee72fe17f34ff2b35b Mon Sep 17 00:00:00 2001 > From: Petr Spacek <pspa...@redhat.com> > Date: Thu, 22 Nov 2012 10:03:21 +0100 > Subject: [PATCH] Remove dead assignments in manager_create_db_instance() and > make log messages verbose. > > Dead assignments were reported by Clang static code analysis. > > Signed-off-by: Petr Spacek <pspa...@redhat.com> > --- > src/zone_manager.c | 10 +++------- > 1 file changed, 3 insertions(+), 7 deletions(-) > > diff --git a/src/zone_manager.c b/src/zone_manager.c > index > 2988cfd0598de57efbc4f7a42447ad1dadce6d65..08ef91907a35564520b8ccb8d9993b49fc88a391 > 100644 > --- a/src/zone_manager.c > +++ b/src/zone_manager.c > @@ -132,11 +132,8 @@ manager_create_db_instance(isc_mem_t *mctx, const char > *name, > result = find_db_instance(name, &db_inst); > if (result == ISC_R_SUCCESS) { > db_inst = NULL; > - result = ISC_R_FAILURE; > - log_error("'%s' already exists", name); > - goto cleanup; > - } else { > - result = ISC_R_SUCCESS; > + log_error("LDAP instance '%s' already exists", name); > + CLEANUP_WITH(ISC_R_EXISTS); > } > > /* Parse settings. */ > @@ -184,8 +181,7 @@ manager_create_db_instance(isc_mem_t *mctx, const char > *name, > if (result != ISC_R_SUCCESS) { > /* In case we don't find any zones, we at least return > * ISC_R_SUCCESS so BIND won't exit because of this. */ > - result = ISC_R_SUCCESS; > - log_error("no valid zones found"); > + log_error_r("no valid zones found in LDAP"); > /* > * Do not jump to cleanup. Rather start timer for zone refresh. > * This is just a workaround when the LDAP server is not > available > -- > 1.7.11.7 > -- Adam Tkac, Red Hat, Inc. _______________________________________________ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel