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

[Cluster-devel] cluster/rgmanager/src/clulib msg_cluster.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	pcaulfield sourceware org	2007-09-11 13:07:24

Modified files:
	rgmanager/src/clulib: msg_cluster.c 

Log message:
	Make it compile with -O2, by fixing a very dodgy cast.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/clulib/msg_cluster.c.diff?cvsroot=cluster&r1=1.5&r2=1.6

--- cluster/rgmanager/src/clulib/msg_cluster.c	2007/07/23 20:49:13	1.5
+++ cluster/rgmanager/src/clulib/msg_cluster.c	2007/09/11 13:07:24	1.6
@@ -249,6 +249,7 @@
 cluster_msg_wait(msgctx_t *ctx, int timeout)
 {
 	struct timespec ts = {0, 0};
+	struct timeval tv = {0, 0};
 	int req = M_NONE;
 	int e;
 
@@ -261,9 +262,9 @@
 		return -1;
 
 	if (timeout > 0) {
-		gettimeofday((struct timeval *)&ts, NULL);
-		ts.tv_sec += timeout;
-		ts.tv_nsec *= 1000;
+		gettimeofday(&tv, NULL);
+		ts.tv_sec = tv.tv_sec + timeout;
+		ts.tv_nsec = tv.tv_usec * 1000;
 	}
 
 	pthread_mutex_lock(&ctx->u.cluster_info.mutex);


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