From: Johan Hedberg <johan.hedberg@gmail.com>
To: "Gustavo F. Padovan" <gustavo@padovan.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/2] log: Add function to get/set debug_string
Date: Wed, 16 Jun 2010 13:29:20 +0300 [thread overview]
Message-ID: <20100616102920.GA6587@jh-x301> (raw)
In-Reply-To: <1276673478-9273-1-git-send-email-gustavo@padovan.org>
Hi Gustavo,
On Wed, Jun 16, 2010, Gustavo F. Padovan wrote:
> +void __btd_log_init(const char *debug, int detach)
> +{
> + int option = LOG_NDELAY | LOG_PID;
> +
> + debug_string = (char *)debug;
This doesn't look right. Either the function declares the parameter as
const for a reason (i.e. it promises not to mess around with it) or then
the const should go away. I think the former is correct in this case,
i.e. you should probably be doing g_strdup on the input parameter.
Johan
next prev parent reply other threads:[~2010-06-16 10:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-16 7:31 [PATCH 1/2] log: Add function to get/set debug_string Gustavo F. Padovan
2010-06-16 7:31 ` [PATCH 2/2] Add SetProperty method and Debug property Gustavo F. Padovan
2010-06-16 10:34 ` Johan Hedberg
2010-06-16 10:29 ` Johan Hedberg [this message]
2010-06-16 13:31 ` [PATCH 1/2] log: Add function to get/set debug_string Marcel Holtmann
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=20100616102920.GA6587@jh-x301 \
--to=johan.hedberg@gmail.com \
--cc=gustavo@padovan.org \
--cc=linux-bluetooth@vger.kernel.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).