Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines with new year.
[simgrid.git] / src / mc / remote / Channel.cpp
index 1fee675..7594e5e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2017. The SimGrid Team.
+/* Copyright (c) 2015-2019. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -29,11 +29,10 @@ Channel::~Channel()
 int Channel::send(const void* message, size_t size) const
 {
   XBT_DEBUG("Send %s", MC_message_type_name(*(e_mc_message_type*)message));
-  while (::send(this->socket_, message, size, 0) == -1)
-    if (errno == EINTR)
-      continue;
-    else
+  while (::send(this->socket_, message, size, 0) == -1) {
+    if (errno != EINTR)
       return errno;
+  }
   return 0;
 }