public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - fence_ipmilan: Cygwin doesn't like NULL in times function
@ 2009-02-05 16:36 Jan Friesse
0 siblings, 0 replies; only message in thread
From: Jan Friesse @ 2009-02-05 16:36 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=02b8db7ee0f7870997c56df32748e2e825a389bb
Commit: 02b8db7ee0f7870997c56df32748e2e825a389bb
Parent: 895786b6d42aa5d980f06625a96e0dea47d25ad1
Author: Jan Friesse <jfriesse@redhat.com>
AuthorDate: Thu Feb 5 17:32:00 2009 +0100
Committer: Jan Friesse <jfriesse@redhat.com>
CommitterDate: Thu Feb 5 17:35:57 2009 +0100
fence_ipmilan: Cygwin doesn't like NULL in times function
Times function was used with NULL parameter. On Linux everything
worked, but Cygwin doesn't like this (returned value was -1). This
patch add foo_tms, which is argument for times. This shouldn't hurt
anything, but makes Cygwin happy.
---
fence/agents/ipmilan/expect.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fence/agents/ipmilan/expect.c b/fence/agents/ipmilan/expect.c
index fa85bd8..45deb6a 100644
--- a/fence/agents/ipmilan/expect.c
+++ b/fence/agents/ipmilan/expect.c
@@ -68,7 +68,7 @@ ExpectToken(int fd, struct Etoken * toklist, int to_secs, char * buf
clock_t ticks;
int nchars = 1; /* reserve space for an EOS */
struct timeval tv;
-
+ struct tms foo_tms; /*This tms is used, because cygwin doesn't like NULL in times*/
struct Etoken * this;
/* Figure out when to give up. Handle lbolt wraparound */
@@ -77,7 +77,7 @@ ExpectToken(int fd, struct Etoken * toklist, int to_secs, char * buf
return -1;
}
- starttime = times(NULL);
+ starttime = times(&foo_tms);
ticks = (to_secs*CLOCKS_PER_SEC);
endtime = starttime + ticks;
@@ -94,7 +94,7 @@ ExpectToken(int fd, struct Etoken * toklist, int to_secs, char * buf
}
- while (now = times(NULL),
+ while (now = times(&foo_tms),
(wraparound && (now > starttime || now <= endtime))
|| (!wraparound && now <= endtime)) {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-02-05 16:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-05 16:36 cluster: STABLE3 - fence_ipmilan: Cygwin doesn't like NULL in times function Jan Friesse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).