aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/ippool/ippool/0001-read-returns-ssize_t.patch
blob: 1b8de349cfb05237f9e1981344206ff377aa356c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From e4e0aae139b6489dc582fd14e54e562126482ce2 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 26 Aug 2017 07:23:53 -0700
Subject: [PATCH 1/3] read() returns ssize_t

Fixes
usl_fd.c:284:10: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
                if (nb < 0) {
                    ~~ ^ ~

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending

 usl/usl_fd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usl/usl_fd.c b/usl/usl_fd.c
index 3b7a813..04ba48c 100644
--- a/usl/usl_fd.c
+++ b/usl/usl_fd.c
@@ -280,7 +280,7 @@ size_t usl_fd_read(int fd, void *buf, size_t count)
 	char *ptr = buf;
 
 	for (chars_read = 0; chars_read < count; ) {
-		size_t nb = read(fd, ptr, count - chars_read);
+		ssize_t nb = read(fd, ptr, count - chars_read);
 		if (nb < 0) {
 			if (errno == EINTR)
 				continue;
-- 
2.14.1