[Cluster-devel] cluster/rgmanager/src/utils clustat.c

pcaulfield at sourceware.org pcaulfield at sourceware.org
Wed Sep 19 10:56:09 UTC 2007


CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	pcaulfield at sourceware.org	2007-09-19 10:56:08

Modified files:
	rgmanager/src/utils: clustat.c 

Log message:
	Fix type-punned pointer warnings

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/utils/clustat.c.diff?cvsroot=cluster&r1=1.34&r2=1.35

--- cluster/rgmanager/src/utils/clustat.c	2007/08/22 08:58:47	1.34
+++ cluster/rgmanager/src/utils/clustat.c	2007/09/19 10:56:08	1.35
@@ -446,6 +446,7 @@
 _txt_rg_state_v(rg_state_t *rs, cluster_member_list_t *members, int flags)
 {
 	char flags_string[255] = "";
+	time_t transtime = rs->rs_transition;
 
 	rg_flags_str(flags_string, sizeof(flags_string), rs->rs_flags, ", ");
 
@@ -463,7 +464,7 @@
 	printf("  Last Owner      : %s\n",
 	       my_memb_id_to_name(members, rs->rs_last_owner));
 	printf("  Last Transition : %s\n",
-	       ctime((time_t *)(&rs->rs_transition)));
+	       ctime(&transtime));
 }
 
 
@@ -482,10 +483,11 @@
 {
 	char time_str[32];
 	char flags_string[255] = "";
+	time_t transtime = rs->rs_transition;
 	int x;
 
 	/* Chop off newlines */
-	ctime_r((time_t *)&rs->rs_transition, time_str);
+	ctime_r((time_t *)&transtime, time_str);
 	for (x = 0; time_str[x]; x++) {
 		if (time_str[x] < 32) {
 			time_str[x] = 0;




More information about the Cluster-devel mailing list