check: Check for pipe return value in check_unaligned_vmsplice

| cr-check.c: In function ‘check_unaligned_vmsplice’:
| cr-check.c:372:2: error: ignoring return value of ‘pipe’, declared with attribute warn_unused_result [-Werror=unused-result]

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov 2013-02-22 14:49:45 +04:00 committed by Pavel Emelyanov
parent 94ef03947a
commit b8ebb4d260

View file

@ -369,7 +369,11 @@ static int check_unaligned_vmsplice(void)
char buf; /* :) */
struct iovec iov;
pipe(p);
ret = pipe(p);
if (ret < 0) {
pr_perror("Can't create pipe");
return -1;
}
iov.iov_base = &buf;
iov.iov_len = sizeof(buf);
ret = vmsplice(p[1], &iov, 1, SPLICE_F_GIFT | SPLICE_F_NONBLOCK);