Mercurial > mplayer.hg
changeset 35308:f570e9faa3c7
Fix off-by-one errors in file descriptor validity checks.
author | reimar |
---|---|
date | Sat, 10 Nov 2012 13:53:29 +0000 |
parents | 57027e8acb11 |
children | c93f7ddd73df |
files | stream/http.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/http.c Sat Nov 10 13:41:38 2012 +0000 +++ b/stream/http.c Sat Nov 10 13:53:29 2012 +0000 @@ -717,7 +717,7 @@ do { redirect = 0; - if (fd > 0) closesocket(fd); + if (fd >= 0) closesocket(fd); fd = http_send_request( url, 0 ); if( fd<0 ) { goto err_out; @@ -847,7 +847,7 @@ } while( redirect ); err_out: - if (fd > 0) closesocket( fd ); + if (fd >= 0) closesocket( fd ); fd = -1; http_free( http_hdr ); http_hdr = NULL;