Re: [PATCH v2 1/2] Add messages backend initialization and finalization

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

 



Hi Slawek,

On Thu, May 26, 2011, Slawomir Bochenski wrote:
> +	tmp = getenv("HOME");
> +	if (!tmp)
> +		return -1;

Try to use return -<some suitable POSIX errno> whenever possible. This
makes error tracking easier in the long run when some higher layer in
the call stack logs the error and you don't have to figure out which of
the 10 places with "return -1" on the lower layers was the cause of it.
Yes, we might have existing places with -1 in the code, but I'd
appreciate if we didn't do it at least for new code.

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