projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: unchecked return value in trace_clock_read64_monotonic
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
ust-clock.h
diff --git
a/src/bin/lttng-sessiond/ust-clock.h
b/src/bin/lttng-sessiond/ust-clock.h
index 7d9c99a66a19c3b55209b86fa91d97f062dcf5bf..9819220d50b641b735c613027354b2541f4168fe 100644
(file)
--- a/
src/bin/lttng-sessiond/ust-clock.h
+++ b/
src/bin/lttng-sessiond/ust-clock.h
@@
-43,7
+43,12
@@
uint64_t trace_clock_read64(void)
{
struct timespec ts;
{
struct timespec ts;
- clock_gettime(CLOCK_MONOTONIC, &ts);
+ if (clock_gettime(CLOCK_MONOTONIC, &ts)) {
+ /* TODO Report error cleanly up the chain. */
+ PERROR("clock_gettime CLOCK_MONOTONIC");
+ ts.tv_sec = 0;
+ ts.tv_nsec = 0;
+ }
return ((uint64_t) ts.tv_sec * 1000000000ULL) + ts.tv_nsec;
}
return ((uint64_t) ts.tv_sec * 1000000000ULL) + ts.tv_nsec;
}
This page took
0.023906 seconds
and
4
git commands to generate.