about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-10-07 14:00:55 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-10-07 14:00:55 -0700
commitf03d2f1529697fca8fd8d45ac4135cd6c5cd5031 (patch)
treec2e7af0e5e147df282dbe97a6aef543b167eab7c
parentd3d301766f1ac7c600151becdae42e822c781142 (diff)
downloadmu-f03d2f1529697fca8fd8d45ac4135cd6c5cd5031.tar.gz
3472
-rw-r--r--091socket.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/091socket.cc b/091socket.cc
index a6f0bc6a..468a1834 100644
--- a/091socket.cc
+++ b/091socket.cc
@@ -60,7 +60,7 @@ socket_t* server_socket(int portno) {
   result->addr.sin_family = AF_INET;
   result->addr.sin_addr.s_addr = INADDR_ANY;
   result->addr.sin_port = htons(portno);
-  if (bind(result->fd, (struct sockaddr*)&result->addr, sizeof(result->addr)) >= 0) {
+  if (bind(result->fd, reinterpret_cast<sockaddr*>(&result->addr), sizeof(result->addr)) >= 0) {
     listen(result->fd, /*queue length*/5);
   }
   else {
@@ -116,7 +116,7 @@ socket_t* accept(socket_t* server) {
   if (server->fd == 0) return NULL;
   socket_t* result = new socket_t;
   socklen_t dummy = sizeof(result->addr);
-  result->fd = accept(server->fd, (struct sockaddr*)&result->addr, &dummy);
+  result->fd = accept(server->fd, reinterpret_cast<sockaddr*>(&result->addr), &dummy);
   return result;
 }