changeset 23486:056c2968b148

Set errno to 0 after printing it, not before
author reimar
date Fri, 08 Jun 2007 07:45:36 +0000
parents f6b20f40a854
children 559c4f075bf1
files stream/stream_dvb.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_dvb.c	Fri Jun 08 06:08:51 2007 +0000
+++ b/stream/stream_dvb.c	Fri Jun 08 07:45:36 2007 +0000
@@ -444,8 +444,8 @@
 		rk = size - pos;
 		if(poll(pfds, 1, 500) <= 0)
 		{
+			mp_msg(MSGT_DEMUX, MSGL_ERR, "dvb_streaming_read, attempt N. %d failed with errno %d when reading %d bytes\n", tries, errno, size-pos);
 			errno = 0;
-			mp_msg(MSGT_DEMUX, MSGL_ERR, "dvb_streaming_read, attempt N. %d failed with errno %d when reading %d bytes\n", tries, errno, size-pos);
 			if(--tries > 0)
 				continue;
 			else