From ee014bbd83f0a2ba16448d01a83fdb7fae7c7849 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Mon, 20 Apr 2020 16:57:00 +0200 Subject: [PATCH] small merge fixes --- src/socket.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/socket.cpp b/src/socket.cpp index 77f1c826..f4cdf5f1 100755 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -54,9 +54,9 @@ void CSocket::Init ( const quint16 iPortNumber ) if ( bIsClient ) { - if (iPortNumber == 0) + if ( iPortNumber == 0 ) { - // If port number is 0, bind the client to a random available port. + // if port number is 0, bind the client to a random available port UdpSocketInAddr.sin_port = htons ( 0 ); bSuccess = ( ::bind ( UdpSocket , @@ -68,12 +68,11 @@ void CSocket::Init ( const quint16 iPortNumber ) // Per definition use the port number plus ten for the client to make // it possible to run server and client on the same computer. If the // port is not available, try "NUM_SOCKET_PORTS_TO_TRY" times with - // incremented port numbers + // incremented port numbers. quint16 iClientPortIncrement = 10; // start value: port nubmer plus ten bSuccess = false; // initialization for while loop - while ( !bSuccess && - ( iClientPortIncrement <= NUM_SOCKET_PORTS_TO_TRY ) ) + while ( !bSuccess && ( iClientPortIncrement <= NUM_SOCKET_PORTS_TO_TRY ) ) { UdpSocketInAddr.sin_port = htons ( iPortNumber + iClientPortIncrement );