diff options
| author | Marcel Holtmann <marcel@holtmann.org> | 2005-12-09 09:39:16 +0000 | 
|---|---|---|
| committer | Marcel Holtmann <marcel@holtmann.org> | 2005-12-09 09:39:16 +0000 | 
| commit | 73fa16fccbb85592973068a25949d4c331f7f475 (patch) | |
| tree | 327a2f8d35d515c0998e89006e82c4c14df19b66 /src | |
| parent | 641d636fb24fb0dea567388a4f0d0f135d4ea48c (diff) | |
Add FD_ZERO() before usage of FD_SET()
Diffstat (limited to 'src')
| -rw-r--r-- | src/sdp.c | 3 | 
1 files changed, 2 insertions, 1 deletions
| @@ -1269,9 +1269,10 @@ int sdp_read_rsp(sdp_session_t *session, uint8_t *buf, uint32_t size)  	fd_set readFds;  	struct timeval timeout = { SDP_RESPONSE_TIMEOUT, 0 }; +	FD_ZERO(&readFds);  	FD_SET(session->sock, &readFds);  	SDPDBG("Waiting for response\n"); -	if (0 == select(session->sock + 1, &readFds, NULL, NULL, &timeout)) { +	if (select(session->sock + 1, &readFds, NULL, NULL, &timeout) == 0) {  		SDPERR("Client timed out\n");  		errno = ETIMEDOUT;  		return -1; | 
