patch for ldb: add application flags
Matthieu Patou
mat at samba.org
Wed Apr 20 12:00:36 MDT 2011
Hi Simo,
On 20/04/2011 17:18, simo wrote:
> 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'
>
What about this one ?
Matthieu.
--
Matthieu Patou
Samba Team http://samba.org
Private repo http://git.samba.org/?p=mat/samba.git;a=summary
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ldb-add-custom-flags-and-functions-for-the-applicati.patch
Type: text/x-patch
Size: 4753 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110420/21032ca1/attachment.bin>
More information about the samba-technical
mailing list