summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libglusterfs/src/timer.c2
-rw-r--r--libglusterfs/src/timespec.c8
-rw-r--r--libglusterfs/src/timespec.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/libglusterfs/src/timer.c b/libglusterfs/src/timer.c
index 0ad6ea59fc2..a059cc2122f 100644
--- a/libglusterfs/src/timer.c
+++ b/libglusterfs/src/timer.c
@@ -48,7 +48,7 @@ gf_timer_call_after (glusterfs_ctx_t *ctx,
return NULL;
}
timespec_now (&event->at);
- timespec_adjust_delta (event->at, delta);
+ timespec_adjust_delta (&event->at, delta);
at = TS (event->at);
event->callbk = callbk;
event->data = data;
diff --git a/libglusterfs/src/timespec.c b/libglusterfs/src/timespec.c
index 0df74e61c20..a0c281a1efb 100644
--- a/libglusterfs/src/timespec.c
+++ b/libglusterfs/src/timespec.c
@@ -60,9 +60,9 @@ void timespec_now (struct timespec *ts)
ts->tv_sec, ts->tv_nsec);
}
-void timespec_adjust_delta (struct timespec ts, struct timespec delta)
+void timespec_adjust_delta (struct timespec *ts, struct timespec delta)
{
- ts.tv_nsec = ((ts.tv_nsec + delta.tv_nsec) % 1000000000);
- ts.tv_sec += ((ts.tv_nsec + delta.tv_nsec) / 1000000000);
- ts.tv_sec += delta.tv_sec;
+ ts->tv_nsec = ((ts->tv_nsec + delta.tv_nsec) % 1000000000);
+ ts->tv_sec += ((ts->tv_nsec + delta.tv_nsec) / 1000000000);
+ ts->tv_sec += delta.tv_sec;
}
diff --git a/libglusterfs/src/timespec.h b/libglusterfs/src/timespec.h
index c584c82c092..490255df9f3 100644
--- a/libglusterfs/src/timespec.h
+++ b/libglusterfs/src/timespec.h
@@ -19,6 +19,6 @@
void tv2ts (struct timeval tv, struct timespec *ts);
void timespec_now (struct timespec *ts);
-void timespec_adjust_delta (struct timespec ts, struct timespec delta);
+void timespec_adjust_delta (struct timespec *ts, struct timespec delta);
#endif /* __INCLUDE_TIMESPEC_H__ */