[SSSD] [PATCH] Backward GOTOs rewritten into do-while loops.

Simo Sorce simo at redhat.com
Tue Aug 7 13:58:47 UTC 2012


One comment and one nitpick.

Comment: polease use --patience flag to git format-patch so that the
patches are more readable.

Nitpick:

On Tue, 2012-08-07 at 15:26 +0200, Ondrej Kos wrote:
> -                                     &num, &gids, limit, &ret);
> -    switch (status) {
> -    case NSS_STATUS_TRYAGAIN:
> +    while ( (status = ctx->ops.initgroups_dyn(pwd->pw_name,
> pwd->pw_gid,
> +                                    &num_gids, &num, &gids, limit,
> &ret))
> +                                    == NSS_STATUS_TRYAGAIN) {
>          /* buffer too small ? */

here please use a do/whiel loop to make code more readable:

do {
	status = ctx->ops.initgrou ...

} while (status == NSS_STATUS_TRYAGAIN);


Simo.


-- 
Simo Sorce * Red Hat, Inc * New York




More information about the sssd-devel mailing list