Просмотр исходного кода

Totempg: remove duplicate memcpy in mcast_msg func

In function mcast_msg of totempg.c, line 923, there is a memcpy call in
"else" branch, and also another memcpy out of the "else" branch, while
the two calls have the same parameters. It is possibleto remove the memcpy
in "else" branch.

Signed-off-by: Bin Liu <bliu@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
Bin Liu 10 лет назад
Родитель
Сommit
819d66ca1c
1 измененных файлов с 0 добавлено и 2 удалено
  1. 0 2
      exec/totempg.c

+ 0 - 2
exec/totempg.c

@@ -923,8 +923,6 @@ static int mcast_msg (
 				data_ptr = (unsigned char *)iovec[i].iov_base + copy_base;
 				data_ptr = (unsigned char *)iovec[i].iov_base + copy_base;
 			else {
 			else {
 				data_ptr = fragmentation_data;
 				data_ptr = fragmentation_data;
-				memcpy (&fragmentation_data[fragment_size],
-				(unsigned char *)iovec[i].iov_base + copy_base, copy_len);
 			}
 			}
 
 
 			memcpy (&fragmentation_data[fragment_size],
 			memcpy (&fragmentation_data[fragment_size],