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

Re: [lvm-devel] [PATCH 12/29] Add test for 'read' result



On Thu, Nov 25, 2010 at 11:55:16AM +0100, Zdenek Kabelac wrote:
> Static analyzer complains when read result is ignored.
 
Compiler should have complained too! Ack.

>  	snprintf(buf, sizeof(buf), DEFAULT_PROC_DIR "/%u/cmdline", pid);

/* FIXME Use generic read code. */

>  	if ((fd = open(buf, O_RDONLY)) > 0) {
> -		read(fd, _proc_cmdline, sizeof(_proc_cmdline) - 1);


Alasdair


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