ubsan: microblaze: left shift cannot be represented in type 'int'
[deliverable/binutils-gdb.git] / sim / common / dv-sockser.c
index f6fd3898ab6b5de1ea63892c7e15f22e669b45bb..74ca355aba4e949d3c1a47eb8a4cb936676ac634 100644 (file)
@@ -1,5 +1,5 @@
 /* Serial port emulation using sockets.
-   Copyright (C) 1998, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 1998-2019 Free Software Foundation, Inc.
    Contributed by Cygnus Solutions.
 
 This program is free software; you can redistribute it and/or modify
@@ -18,6 +18,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 /* FIXME: will obviously need to evolve.
    - connectionless sockets might be more appropriate.  */
 
+#include "config.h"
 #include "sim-main.h"
 
 #ifdef HAVE_STRING_H
@@ -174,12 +175,12 @@ dv_sockser_init (SIM_DESC sd)
     }
 
   sockaddr.sin_family = PF_INET;
-  sockaddr.sin_port = htons(port);
+  sockaddr.sin_port = htons (port);
   memcpy (&sockaddr.sin_addr.s_addr, hostent->h_addr,
          sizeof (struct in_addr));
 
   tmp = 1;
-  if (setsockopt (sockser_listen_fd, SOL_SOCKET, SO_REUSEADDR, (void*)& tmp, sizeof(tmp)) < 0)
+  if (setsockopt (sockser_listen_fd, SOL_SOCKET, SO_REUSEADDR, (void*)& tmp, sizeof (tmp)) < 0)
     {
       sim_io_eprintf (sd, "sockser init: unable to set SO_REUSEADDR: %s\n",
                      strerror (errno));
This page took 0.02475 seconds and 4 git commands to generate.