mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-15 17:47:09 +00:00
Fix an some strange code found by a clang warning
This commit is contained in:
parent
fc84f0f6a0
commit
0f94f409a1
@ -127,10 +127,10 @@ static int get_line(int sock, char line[], short linesize)
|
||||
if (!sz) return 0;
|
||||
|
||||
// get the line
|
||||
while (sz > linesize) {
|
||||
while (sz >= linesize) {
|
||||
// this is just a hack (being lazy), this should not happen anyway
|
||||
net_recv(sock, line, linesize);
|
||||
sz -= sizeof(line);
|
||||
sz -= linesize;
|
||||
}
|
||||
if (!net_recv(sock, line, sz)) return 0;
|
||||
line[sz] = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user