[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/group/daemon main.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	teigland sourceware org	2007-01-11 17:59:25

Modified files:
	group/daemon   : main.c 

Log message:
	Move memset(0) into the for loop so we're clearing the data buffer
	each time through.  We were seeing some bogus data from group_tool -v.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/main.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.51.2.5&r2=1.51.2.6

--- cluster/group/daemon/main.c	2006/12/13 19:05:46	1.51.2.5
+++ cluster/group/daemon/main.c	2007/01/11 17:59:25	1.51.2.6
@@ -502,10 +502,10 @@
 	int rv, count = 0, max = atoi(argv[1]);
 
 	data = malloc(sizeof(group_data_t));
-	memset(data, 0, sizeof(group_data_t));
 	count = 0;
 
 	list_for_each_entry(g, &gd_groups, list) {
+		memset(data, 0, sizeof(group_data_t));
 		copy_group_data(g, data);
 		rv = do_write(client[ci].fd, data, sizeof(group_data_t));
 		if (rv < 0) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]