On 09/21/2015 05:46 PM, Jakub Hrozek wrote:
On Fri, Sep 18, 2015 at 05:51:47PM +0200, Pavel Reichl wrote:
On 09/18/2015 02:22 PM, Jakub Hrozek wrote:
I would just like to squash these style changes:
diff --git a/src/providers/ldap/sdap_dyndns.c b/src/providers/ldap/sdap_dyndns.c index c80a468..673f884 100644 --- a/src/providers/ldap/sdap_dyndns.c +++ b/src/providers/ldap/sdap_dyndns.c @@ -395,7 +395,6 @@ sdap_dyndns_update_done(struct tevent_req *subreq) /* init iterator for addresses to be deleted */ state->ptr_addr_iter = sdap_get_address_to_delete(state->dns_addrlist, state->remove_af); - if (state->ptr_addr_iter == NULL) { /* init iterator for addresses to be added */ state->del_phase = false; @@ -438,9 +437,9 @@ static struct sss_iface_addr* sdap_get_address_to_delete(struct sss_iface_addr *address_it, uint8_t remove_af) { - while (address_it != NULL) { - struct sockaddr_storage* address;
I don't mind in this particular case, but generally I think that it's a good practice to minimize variable scope as much as possible.
+ struct sockaddr_storage* address; + while (address_it != NULL) { address = sss_iface_addr_get_address(address_it); /* skip addresses that are not to be deleted */ @@ -450,6 +449,7 @@ sdap_get_address_to_delete(struct sss_iface_addr *address_it, address_it = sss_iface_addr_get_next(address_it); } + return address_it; }
Then the code would look OK to me. _______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
Style changes done. Please see attached patch.
ACK code-wise and based on simple testing. Did you have a chance to run downstream tests? If yes, I'll push the patch..
I've asked Dan to run them, but it seems there are some technical troubles not related to the patches. I'm afraid we have to wait a little longer for results.