From: Michael Nazzareno Trimarchi <michael@amarulasolutions.com>
To: Daniel Wagner <wagi@monom.org>
Cc: connman@lists.linux.dev, Jan.Ryll@bshg.com, Simon.Holesch@bshg.com
Subject: Re: [PATCH] Add GetKnownServices api to connaman
Date: Tue, 26 Oct 2021 09:42:36 +0200 [thread overview]
Message-ID: <CAOf5uwkyhumUFPj8xsJ--r6hwDKJ2tAdkfg_+0pkpcdeHnto8g@mail.gmail.com> (raw)
In-Reply-To: <20211026073737.jtlyqaj2azyiauee@carbon.lan>
Hi Daniel
On Tue, Oct 26, 2021 at 9:37 AM Daniel Wagner <wagi@monom.org> wrote:
>
> On Tue, Oct 26, 2021 at 09:09:06AM +0200, Michael Nazzareno Trimarchi wrote:
> > > > + service->identifier = g_strdup(services[i]);
> > > > + service_id_parts = g_strsplit(services[i], "_", -1);
> > > > +
> > > > + if (service_id_parts == NULL) {
> > > > + g_free(service);
> > > > + continue;
> > > > + }
> > >
> > > IIRC, this check will always be false, as g_strsplit() will return a
> > > valid array or call abort() if allocation fails.
> > >
> >
> > I don't want an abort to be called, I will adjust it.
>
> Sorry, I didn't express it clearly, g_strsplit() will call abort(). This
> means the return value of g_str*() function always succeed, thus you
> don't have to check for NULL.
Sorry, I have already checked the code in the project in the meantime
. I understand
Michael
--
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________
Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com
prev parent reply other threads:[~2021-10-26 7:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 13:26 [PATCH] Add GetKnownServices api to connaman Michael Trimarchi
2021-10-26 7:04 ` Daniel Wagner
2021-10-26 7:09 ` Michael Nazzareno Trimarchi
2021-10-26 7:37 ` Daniel Wagner
2021-10-26 7:42 ` Michael Nazzareno Trimarchi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAOf5uwkyhumUFPj8xsJ--r6hwDKJ2tAdkfg_+0pkpcdeHnto8g@mail.gmail.com \
--to=michael@amarulasolutions.com \
--cc=Jan.Ryll@bshg.com \
--cc=Simon.Holesch@bshg.com \
--cc=connman@lists.linux.dev \
--cc=wagi@monom.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).