Re: [PATCH db-tools 04/11] Find RNG schema in default database locations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 8, 2016 at 1:34 PM, Daniel P. Berrange <berrange@xxxxxxxxxx> wrote:
> On Wed, Jul 06, 2016 at 01:28:31PM +0200, Fabiano Fidêncio wrote:
>> On Tue, Jun 28, 2016 at 5:52 PM, Daniel P. Berrange <berrange@xxxxxxxxxx> wrote:
>> > With the split out database, the RNG schema will no longer
>> > be installed by the code, instead it will be distributed
>> > as part of the database. Thus we should look in the database
>> > locations to find the schema.
>> >
>> > Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
>> > ---
>> >  po/POTFILES.in             |  1 +
>> >  tools/Makefile.am          |  2 +-
>> >  tools/osinfo-db-util.c     | 49 ++++++++++++++++++++++++++++++++++++++++++++++
>> >  tools/osinfo-db-util.h     |  7 +++++++
>> >  tools/osinfo-db-validate.c | 29 ++++++++++++++++++---------
>> >  5 files changed, 78 insertions(+), 10 deletions(-)
>
> [snip]
>
>> > +    for (i = 0; i < npaths; i++) {
>> > +        ret = g_file_resolve_relative_path(paths[i], file);
>> > +        if (g_file_query_exists(ret, NULL))
>> > +            break;
>> > +        g_object_unref(ret);
>> > +        ret = NULL;
>> > +    }
>> > +
>> > +    if (!ret) {
>>
>> This is just my personal preference, but I really would like to have
>> explicit comparisons in all cases that you're not checking against a
>> boolean. But feel free to ignore, probably there are a lot of other
>> places doing the same.
>
> IMHO this is pretty standard style for checking pointers for NULL
> status.

FWIW, I also prefer being explicit here.

-- 
Regards,

Zeeshan Ali (Khattak)

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux