summaryrefslogtreecommitdiff
path: root/sockets.c
diff options
context:
space:
mode:
authorJoe_D <http://projects.vdr-developer.org/users/5>2012-04-23 21:59:49 +0200
committerJoachim Wilke <git@joachim-wilke.de>2012-04-25 08:46:28 +0200
commit2affda19727ee8e71657c0f2785bb3bf2e732e80 (patch)
treeef23f2be9d6cd42b0d88dc2238ddef426c3ec486 /sockets.c
parent8cb39f7aebb3a1978369ed6121504f99fb121b49 (diff)
downloadvdr-plugin-lcdproc-2affda19727ee8e71657c0f2785bb3bf2e732e80.tar.gz
vdr-plugin-lcdproc-2affda19727ee8e71657c0f2785bb3bf2e732e80.tar.bz2
Patch to prevent cppcheck warnings/errors and valgrind messages
- Submitted by Joe_D #943
Diffstat (limited to 'sockets.c')
-rw-r--r--sockets.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sockets.c b/sockets.c
index ff3a6a6..2df4fc7 100644
--- a/sockets.c
+++ b/sockets.c
@@ -134,7 +134,7 @@ sock_recv_string (int fd, char *dest, size_t maxlen)
if (!dest)
return -1;
- if (maxlen <= 0)
+ if (maxlen == 0)
return 0;
while (1) {
@@ -215,7 +215,7 @@ sock_recv (int fd, void *dest, size_t maxlen)
if (!dest)
return -1;
- if (maxlen <= 0)
+ if (maxlen == 0)
return 0;
err = read (fd, dest, maxlen);