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

totemudp: memset of proper size

In totemudp_mcast_thread_state_constructor memset to
sizeof(struct totemudp_mcast_thread_state) instead of size of
pointer.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
(cherry picked from commit 531e81602f8b47846aec8573dc57cb8941100367)
Jan Friesse 14 лет назад
Родитель
Сommit
811ccc64df
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      exec/totemudp.c

+ 1 - 1
exec/totemudp.c

@@ -1059,7 +1059,7 @@ static void totemudp_mcast_thread_state_constructor (
 	struct totemudp_mcast_thread_state *totemudp_mcast_thread_state =
 	struct totemudp_mcast_thread_state *totemudp_mcast_thread_state =
 		(struct totemudp_mcast_thread_state *)totemudp_mcast_thread_state_in;
 		(struct totemudp_mcast_thread_state *)totemudp_mcast_thread_state_in;
 	memset (totemudp_mcast_thread_state, 0,
 	memset (totemudp_mcast_thread_state, 0,
-		sizeof (totemudp_mcast_thread_state));
+		sizeof (*totemudp_mcast_thread_state));
 
 
 	rng_make_prng (128, PRNG_SOBER,
 	rng_make_prng (128, PRNG_SOBER,
 		&totemudp_mcast_thread_state->prng_state, NULL);
 		&totemudp_mcast_thread_state->prng_state, NULL);