[lvm-devel] [PATCH 12/29] Add test for 'read' result
Alasdair G Kergon
agk at redhat.com
Mon Nov 29 20:19:47 UTC 2010
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
More information about the lvm-devel
mailing list