linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Gustavo Padovan <gustavo@padovan.org>
Cc: linux-bluetooth@vger.kernel.org,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Subject: Re: [PATCH -v3 2/2] rctest: add option to save received data to file
Date: Mon, 3 Sep 2012 15:01:04 +0300	[thread overview]
Message-ID: <20120903120104.GC30636@x220> (raw)
In-Reply-To: <1346446228-11105-2-git-send-email-gustavo@padovan.org>

Hi Gustavo,

On Fri, Aug 31, 2012, Gustavo Padovan wrote:
> +		if (save_fd < 0)
> +			syslog(LOG_ERR, "Failed to open file to save "
> +								"recv data");

Please don't split strings like this if not necessary. It makes greping
harder (you see something in the command output and try to locate it in
the source). Split after "LOG_ERR," instead.

> +static void sig_child_exit(int code)
> +{
> +	syslog(LOG_INFO, "Exit");
> +	exit(0);
> +
> +	if (save_fd >= 0)
> +		close(save_fd);
> +}

This doesn't look right as nothing after the exit() call will get
executed. I suppose you meant to ahve the save_fd closing before the
exit call?

Johan

  reply	other threads:[~2012-09-03 12:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-31 20:50 [PATCH -v3 1/2] rctest: add automated test Gustavo Padovan
2012-08-31 20:50 ` [PATCH -v3 2/2] rctest: add option to save received data to file Gustavo Padovan
2012-09-03 12:01   ` Johan Hedberg [this message]
2012-10-08  3:50 ` [PATCH -v4 1/2] rctest: add automated test Gustavo Padovan
2012-10-08  3:50   ` [PATCH -v4 2/2] rctest: add option to save received data to file Gustavo Padovan
2012-10-12 14:58   ` [PATCH -v4 1/2] rctest: add automated test Johan Hedberg

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=20120903120104.GC30636@x220 \
    --to=johan.hedberg@gmail.com \
    --cc=gustavo.padovan@collabora.co.uk \
    --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).