diff options
author | Joe_D <http://projects.vdr-developer.org/users/5> | 2012-04-23 21:59:49 +0200 |
---|---|---|
committer | Joachim Wilke <git@joachim-wilke.de> | 2012-04-25 08:46:28 +0200 |
commit | 2affda19727ee8e71657c0f2785bb3bf2e732e80 (patch) | |
tree | ef23f2be9d6cd42b0d88dc2238ddef426c3ec486 /sockets.c | |
parent | 8cb39f7aebb3a1978369ed6121504f99fb121b49 (diff) | |
download | vdr-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |