patch for ldb: add application flags

simo idra at samba.org
Wed Apr 20 07:18:01 MDT 2011


On Tue, 2011-04-19 at 01:01 +0400, Matthieu Patou wrote:
> +
> +/**
> +  get custom flags. Those flags are set by applications using ldb,
> +  they are application dependent and the same bit can have different
> +  meaning in different application.
> + */
> +uint32_t ldb_req_get_custom_flag(struct ldb_request *req)
> +{
> +       if (req != NULL && req->handle != NULL) {
> +               return req->handle->custom_flags;
> +       } else {
> +               /*
> +                * 0 is not something any better or worse than
> +                * anything else as req or the handle is NULL
> +                */
> +               return 0;
> +       }
> +
> +}

This is much more readable if you do:

if (...) {
	return ..
}

return 0;

No need for the else switch.
 
>  APPNAME = 'ldb'
> -VERSION = '1.0.2'
> +VERSION = '1.0.3'

Please leave the version change off the patch, and let metze handle it.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>



More information about the samba-technical mailing list