initialize variable to 1 before passing to syscall
Stefan Schuermans

Stefan Schuermans commited on 2011-12-14 23:02:39
Showing 1 changed files, with 1 additions and 0 deletions.

... ...
@@ -35,6 +35,7 @@ Udp4Sock::Udp4Sock()
35 35
   }
36 36
 
37 37
   // enable address re-use
38
+  opt = 1;
38 39
   if (setsockopt(m_fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) != 0) {
39 40
     close(m_fd);
40 41
     m_fd = -1;
41 42