[SSSD] [PATCH] DDNS: execute nsupdate for single update of PTR rec

Pavel Reichl preichl at redhat.com
Fri Sep 18 15:51:47 UTC 2015



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 at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
>

Style changes done. Please see attached patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-DDNS-execute-nsupdate-for-single-update-of-PTR-rec.patch
Type: text/x-patch
Size: 16124 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150918/aca9c81e/attachment-0001.bin>


More information about the sssd-devel mailing list