Re: [PATCH -v3 2/2] rctest: add option to save received data to file

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

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux