Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 7 additions and 4 deletions.
  1. +7 −4 src/ardrone.cpp
View
11 src/ardrone.cpp
@@ -694,10 +694,13 @@ bool DroneController::setupSocket(Socket &socket, const unsigned short bindTo) c
socket = Socket::udp();
bool success = true;
- success &= socket.setBlocking(false);
- success &= socket.setReusable(true);
- if(bindTo) success &= socket.bind(bindTo);
- if(!success) socket.close();
+ if(success) success &= socket.setBlocking(false);
+ if(success) success &= socket.setReusable(true);
+ if(success && bindTo) success &= socket.bind(bindTo);
+ if(!success) {
+ perror("setupSocket");
+ socket.close();
+ }
return success;
}

No commit comments for this range

Something went wrong with that request. Please try again.