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

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



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	lhh sourceware org	2007-12-10 18:24:13

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

Log message:
	Fix type-pun warnings in clustat.c on i386

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

--- cluster/rgmanager/src/utils/clustat.c	2007/12/06 17:52:32	1.25.2.8
+++ cluster/rgmanager/src/utils/clustat.c	2007/12/10 18:24:12	1.25.2.9
@@ -492,6 +492,8 @@
 void
 _txt_rg_state_v(rg_state_t *rs, cluster_member_list_t *members, int flags)
 {
+	time_t t;
+
 	printf("Service Name      : %s\n", rs->rs_name);
 	printf("  Current State   : %s (%d)\n",
 	       rg_state_str(rs->rs_state), rs->rs_state);
@@ -499,8 +501,9 @@
 	       my_memb_id_to_name(members, rs->rs_owner));
 	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)));
+
+	t = (time_t)(rs->rs_transition);
+	printf("  Last Transition : %s\n", ctime(&t));
 }
 
 
@@ -520,9 +523,11 @@
 {
 	char time_str[32];
 	int x;
+	time_t t;
 
 	/* Chop off newlines */
-	ctime_r((time_t *)&rs->rs_transition, time_str);
+       	t = (time_t)(rs->rs_transition);
+	ctime_r(&t, time_str);
 	for (x = 0; time_str[x]; x++) {
 		if (time_str[x] < 32) {
 			time_str[x] = 0;


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