[MPlayer-cvslog] r32078 - trunk/udp_sync.c
reimar
subversion at mplayerhq.hu
Wed Sep 8 19:59:07 CEST 2010
Author: reimar
Date: Wed Sep 8 19:59:07 2010
New Revision: 32078
Log:
Do not check a condition that can never be false and move its comment
to the real check.
Modified:
trunk/udp_sync.c
Modified: trunk/udp_sync.c
==============================================================================
--- trunk/udp_sync.c Wed Sep 8 19:55:35 2010 (r32077)
+++ trunk/udp_sync.c Wed Sep 8 19:59:07 2010 (r32078)
@@ -106,6 +106,7 @@ int get_udp(int blocking, float *master_
chars_received = recvfrom(sockfd, mesg, sizeof(mesg)-1, 0,
(struct sockaddr *)&cliaddr, &len);
+ // UDP wait error, probably a timeout. Safe to ignore.
if (chars_received == -1)
return 0;
@@ -125,7 +126,6 @@ int get_udp(int blocking, float *master_
return 1;
}
- if (chars_received > -1) {
mesg[chars_received] = 0;
if (strcmp(mesg, "bye") == 0) {
@@ -134,9 +134,6 @@ int get_udp(int blocking, float *master_
sscanf(mesg, "%f", master_position);
return 0;
}
- } else {
- // UDP wait error, probably a timeout. Safe to ignore.
- }
return 0;
}
More information about the MPlayer-cvslog
mailing list