Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
An unsigned int cannot be negative.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 21 Feb 2012 15:50:00 +0000 (16:50 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 21 Feb 2012 15:50:00 +0000 (16:50 +0100)
Remove useless asserts.

src/gras/Transport/transport_plugin_file.c
src/xbt/datadesc/ddt_exchange.c

index ba81c85..29f64f0 100644 (file)
@@ -208,7 +208,6 @@ gras_trp_file_chunk_send_raw(xbt_socket_t sock,
 {
 
   xbt_assert(sock->outgoing, "Cannot write on client file socket");
-  xbt_assert(size >= 0, "Cannot send a negative amount of data");
 
   while (size) {
     int status = 0;
@@ -244,7 +243,6 @@ gras_trp_file_chunk_recv(xbt_socket_t sock,
 
   xbt_assert(sock, "Cannot recv on an NULL socket");
   xbt_assert(sock->incoming, "Cannot recv on client file socket");
-  xbt_assert(size >= 0, "Cannot receive a negative amount of data");
 
   if (sock->recvd) {
     data[0] = sock->recvd_val;
index 12f601d..1a23b84 100644 (file)
@@ -323,12 +323,8 @@ xbt_datadesc_memcpy_rec(xbt_cbps_t state,
       array_count = array_data.fixed_size;
       if (array_count == -1)
         array_count = subsize;
-      if (array_count == -1) {
+      if (array_count == -1)
         array_count = array_data.dynamic_size(type, state, src);
-        xbt_assert(array_count >= 0,
-                    "Invalid (negative) array size for type %s",
-                    type->name);
-      }
 
       /* send the content */
       sub_type = array_data.type;