1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

Remove a pointless while loop

This commit is contained in:
Volker Lendecke 2008-01-25 09:21:44 +01:00
parent c94c04e3e6
commit f591bd68ea

View File

@ -1123,20 +1123,16 @@ ssize_t read_smb_length_return_keepalive(int fd,
{
ssize_t len=0;
int msg_type;
bool ok = false;
while (!ok) {
ok = (read_socket_with_timeout(fd,inbuf,4,4,timeout,pre) == 4);
if (!ok) {
return -1;
}
if (read_socket_with_timeout(fd, inbuf, 4, 4, timeout, pre) != 4) {
return -1;
}
len = smb_len(inbuf);
msg_type = CVAL(inbuf,0);
len = smb_len(inbuf);
msg_type = CVAL(inbuf,0);
if (msg_type == SMBkeepalive) {
DEBUG(5,("Got keepalive packet\n"));
}
if (msg_type == SMBkeepalive) {
DEBUG(5,("Got keepalive packet\n"));
}
DEBUG(10,("got smb length of %lu\n",(unsigned long)len));